(CNN) -- Britain's Prince Harry apologized through a spokesman Saturday after videos surfaced showing him using offensive language to describe people in his military unit.
Prince Harry apologized for videos of him making offensive comments while on military duty in 2006.
In one clip, a voice said to be Harry's calls a soldier a "Paki." In another clip, the voice tells a soldier wearing a cloth on his head that he looks "like a raghead."
The British newspaper News of the World posted the videos on its Web site Saturday. It did not say how it obtained them.
A spokesman for Prince Harry apologized in a statement released by St. James's Palace Saturday. The spokesman said the prince -- who is third in line to the British throne -- "understands how offensive this term can be, and is extremely sorry for any offense his words might cause."
It is not the first apology for offensive behavior by Prince Harry.
In 2005, he was photographed wearing a Nazi uniform to a party. He said he was sorry for that incident. "It was a very stupid thing to do and I've learned my lesson, simple as that really," he said in a September 2005 interview with Britain's Press Association, marking his 21st birthday. "I'd like to put it in the past now. What's done is done. I regret it."
The videos that surfaced Saturday were filmed by the prince himself during his military service in 2006, according to the News of the World Web site.
"Ahh, our little Paki friend... Ahmed," a voice says as the camera zooms in on a soldier from across the room. The video does not show Prince Harry's face.
The soldiers were waiting for their flight to Cyprus for a mission, according to the Web site.
The Royal family said the 'Paki' term was a nickname for a friend in his platoon.
"There is no question that Prince Harry was in any way seeking to insult his friend," the St. James's Palace statement said.
The second video was filmed after arriving in Cyprus, according to News of the World, and shows a British soldier with a cloth over his head.
A voice, which the News of the World claims to be Harry's, is heard saying, "(expletive) me, you look like a raghead."
St. James's Palace said, "Prince Harry used the term 'raghead' to mean Taliban or Iraqi insurgent."
Dickie Arbiter, a former press secretary to Queen Elizabeth II, Prince Harry's grandmother, urged people to take the prince's words in context.
"Harry is not the same man as he was three years ago," Arbiter told Britain's ITN network. "You don't think when you are shooting a video."
And he pointed out that Harry was serving in the army, where language is not always delicate.
"It is quite common for names to be used in the military.... He's a serviceman first and foremost, but people see him as a prince first and he has to be careful of what he says."
The British Ministry of Defense said it was not aware of any complaints against Prince Harry and would investigate the allegations of inappropriate behavior, according to a written statement released Saturday.
"Bullying and racism are not endemic in the Armed Forces," it said.
David Cameron, the leader of Britain's opposition Conservative Party, said Prince Harry's remark was "obviously a completely unacceptable thing to say."
But he told the BBC's Andrew Marr program that he saw no need for the prince to be disciplined. "No, he has made an apology... and I think that's enough."
--CNN's Katy Byron and Per Nyberg contributed to this report.
All About Prince Harry of Wales