Chief of the General Staff Sir Richard Dannatt said he would have to consider whether to pull the third in line to the throne out of Afghanistan immediately now that his cover had been blown.

He said all media outlets in the UK had agreed to a news blackout until Prince Harry returned from operations, an agreement which proved it was "perfectly possible" for the 23-year-old to live as a normal soldier.

But details of his time in combat were published in Australian magazine New Idea and picked up by the US-based website the Drudge Report after 10 weeks on the front line.

New Idea first published its story on its website on January 7 and then in its subsequent magazine edition

German women's magazine "Frau Im Speigel" also ran a story earlier this week entitled "Prince Harry in Iraq?"

Without confirming any deployment, it quoted a anonymous "royal" source, saying"“it is quite conceivable that Harry is serving in Iraq or Afghanistan".

"I am very disappointed that foreign websites have decided to run this story without consulting us," said Sir Richard.

"This is in stark contrast to the highly responsible attitude that the whole of the UK print and broadcast media, along with a small number of overseas, who have entered into an understanding with us over the coverage of Prince Harry on operations.

"After a lengthy period of discussion between the MoD and the editors of regional, national and international media, the editors took the commendable attitude to restrain their coverage.

"I would like to thank them for that and I do appreciate that once the story was in the public domain, they had no choice but to follow suit."

Only a close circle of family and friends and as few as 15 Ministry of Defence officials were told in advance, to avoid making Prince Harry or those around him more of a target. Among those kept informed was the Queen.

As part of the deal between the media and the MoD, a small number of journalists went to Helmand Province in southern Afghanistan to report.

Sir Richard said: "What the last two months have shown is that it is perfectly possible for Prince Harry to be employed just the same as other Army officers of his rank and experience.

"In deciding to deploy him to Afghanistan, it was my judgment that with an understanding with the media not to broadcast his whereabouts, the risk in doing was manageable.

"Now that the story is in the public domain, the Chief of Defence Staff and I will take advice from the operational commanders about whether his deployment can continue.

"I now appeal to the media to restrain from attempting to report Prince Harry's every move and return to our understanding."

This is not the first time the prince has been thwarted by his royal status from living as a normal soldier.

His deployment to Iraq last year was cancelled after exposure in the media led to intelligence that he and those around him would be under threat if he went.

While in Afghanistan, Prince Harry has been under the watch of artillery commander Major Andy Dimmock, who was partly responsible for helping to keep the prince's presence a secret.

"When people come along we just brief them saying: 'When you phone home don't start saying guess who I'm working with'," he said.

"All the lads phone home as normal, we just say don't tell them who you are with."

The Australian magazine which published news of Prince Harry's deployment was condemned by its readers, who claimed the decision had put his life on the line. Its website was full of criticism.

An Australian soldier called rmpdavid, who serves in the British Army, wrote: "Well done. You broke a world embargo on this and as a result it's most likely that a young officer (who happens to be a Royal) will now have to return from operations due to the increased risk to himself and fellow British soldiers.