The Conservative leader said the Prince was right to have said sorry after being caught on video referring to his colleague Ahmed Raza Khan as "our little Paki friend".

"It is obviously a completely unacceptable thing to say, and it's right that he's apologised," said Mr Cameron, who sacked Patrick Mercer, a shadow defence minister, from the Tory frontbench in 2007 after he made controversial comments on race in the Army.

He added: "In the great institutions, whether it's the Army or political parties, we have had to root out attitudes - and that has to go right across the institutions, it's very important."

Asked in a BBC interview whether the Army should take action against the Prince, Mr Cameron said: "No. He's made an apology, it's important that he's clear about that and I think that's enough."

Mr Mercer, a former soldier, said Harry's comments were a "serious mistake" but emphasised that they were the words of a "young man".

He told the BBC that the Prince "has been willing to go on operations and risk his life, that's a hell of a thing to do."

Earlier Iftakhar Raja, Mr Khan's uncle, said he "expected better" from a member of the Royal family.

He described the comments as "definitely derogatory" and "insulting".

Mr Raja, from Croydon, south London, said: "At no time [Mr Khan] told us that he was called Paki or he was a good friend of Prince Harry, I mean, although they served together, that is true.

"I am proud to be British and if someone called me Pakistani I would be proud to be called that, but Paki is definitely a derogatory remark and it's insulting.

"We expect better from our Royal Family on whom we spend millions and millions of pounds for training and schooling and they come with the f-word and calling people Paki or whatever."

Rod Richards, who served as a Foreign Office minister in John Major's Conservative government and also as an officer in the Royal Marines, said that taken in a military context, Harry's comments were not racist or derogatory.

He said: "I am a Welshman and it was quite common for people like me to be called Taffy. Similar nicknames are also used for people from other parts of the world.

"The use of the word 'Paki' doesn't surprise me but in a military context, it is not derogatory. People are making an issue out of something that is not an issue."

The video shows the Prince when he was on manoeuvres while still an officer cadet at Sandhurst military academy.

Prince Harry and the other cadets were on their way to exercises in Cyprus when he made the racist comment during filming in the airport departure lounge, it was reported.

A spokesman for St James's Palace said: "Prince Harry fully understands how offensive this term can be, and is extremely sorry for any offence his words might cause.

"However, on this occasion three years ago, Prince Harry used the term without any malice and as a nickname about a highly popular member of his platoon.

"There is no question that Prince Harry was in any way seeking to insult his friend."

Mohammed Shafiq, the director of Muslim youth organisation the Ramadan Foundation, said that the Prince's comments would offend many people.

"I am deeply shocked and saddened at Prince Harry's racism, which upsets and offends many British Asians," he said. "The use of this sort of racism has no justification and I am saddened by those that are advocating using this term is not racist.

"Prince Harry as a public figure must ensure that he promotes equality and tolerance and this rant, whether today or three years ago, is sickening and he should be thoroughly ashamed of himself."

The video comes as the latest in a line of incidents for which the Prince has attracted criticism.

In 2005, he caused controversy when he attended a friend's fancy dress birthday party wearing a swastika armband.

Clarence House quickly issued a fulsome statement saying the young prince was sorry if he had caused any offence.

In recent years Harry has worked hard to shake off a reputation as a playboy prince earned from his regular appearances on the London nightclub scene.

In the past he has given his critics plenty of ammunition, from smoking cannabis as a teenager to a nightclub scuffle with a paparazzi photographer.