- Officials confirm the photos are of Prince Harry
- He is on a vacation before returning to military duty, a palace official says
- Harry apologized in 2005 for wearing a Nazi uniform to a party
- He is third in line to the British throne
(CNN) -- What happens in Vegas stays in Vegas -- unless you're Prince Harry and TMZ publishes pictures of you cavorting naked during a game of strip billiards.
The tabloid website posted the photos online Tuesday night. It said the romp featuring the royal, who is third in line to the throne, took place four days earlier at a "high rollers hotel suite" on the Las Vegas strip.
One photo shows Harry, stark naked but for a wristwatch and a necklace. His hands cup his genitals. His face is turned toward the television set in the suite. And his body partially shields that of another person, also naked.
A second picture shows him hugging a woman from behind next to a pool table. Both are naked.
Palace officials confirmed the photos are of the prince.
"Prince Harry has been on a private holiday before he resumes his military duties," said a palace official, declining to be named in line with protocol.
Britain's Daily Telegraph newspaper website said the publication of the photographs "risks embarrassing Buckingham Palace and raises questions about the prince's security arrangements."
The website of the Daily Mail, a middlebrow tabloid, suggested that "Harry needed a rest after all that Olympic duty but it appears the fun may have got out of hand."
Neither website ran the photos, but the images quickly circulated worldwide, providing plenty of fodder on Twitter.
"The Queen must be sooo proud that Prince Harry showed us his crown jewels!!!! Lol," said Danielle Monaro, part of the Elvis Duran And The Morning Show, a syndicated radio program.
The 27-year-old Harry is no stranger to controversy.
In 2002, he faced accusations of under-age drinking and cannabis use. The young prince was a 16-year-old schoolboy at the time of the alleged incident
The allegations were made in the UK tabloid News of the World newspaper, which also reported his father, Prince Charles, had taken Harry to a drug rehabilitation clinic to alert him to the dangers of drug abuse.
He did not faces charges because police found no evidence to support them.
In 2005, photos of Harry wearing a Nazi soldier's uniform to a fancy dress party were splashed across the front page of The Sun newspaper, accompanied by the headline "Harry the Nazi."
He later apologized for the incident.
"I am very sorry if I caused any offense," Harry said.
Four years later, Harry issued another apology after videos surfaced showing him using offensive language to describe members of his military unit.
In one clip, a voice said to be Harry's calls a soldier a "Paki," a derogatory term for people of South Asian descent.
In another clip, the voice tells a soldier wearing a cloth on his head that he looks "like a raghead," another offensive term for someone who wears a headdress.
Now comes this latest controversy -- one that certainly gives a whole new meaning to the phrase "hanging out."
How 'soldier prince' Harry tore up royal rule book
Harry is a captain in the Army and served briefly in Afghanistan four years ago, but was hurriedly withdrawn when news of his deployment leaked.
Since then, he has qualified as an Apache helicopter pilot, doing some of his training in the United States, and is expected to deploy to Afghanistan again.
CNN Royal Correspondent Max Foster contributed to this report.