Prince Harry under guard during Taliban attack on base
Prince Harry was moved under guard to a secure location during a Taliban attack on Camp Bastion in Afghanistan, the defence secretary has said.
Philip Hammond said "additional security arrangements" recognised that the prince "could be a target ... specifically as a result of who he is".
But he faced the same risk in combat as any Apache helicopter pilot, Mr Hammond told BBC Two's Newsnight programme.
Two US marines were killed in the attack last Friday evening.
The Taliban has said the attack was a response to an amateur US-made film mocking Islam and that the base was chosen because Prince Harry was there.
In the immediate aftermath of the attack, a spokesman for Nato-led forces in Afghanistan, Major Martyn Crighton, told reporters that Prince Harry was "never in any danger".
He confirmed Prince Harry had been on the base at the time but did not disclose details of the measures taken to protect him.
Mr Hammond said: "Once we knew on Friday night that the perimeter at Bastion had been breached he would have been moved to a secure position under effective guard."
The defence secretary added: "He is serving there as an ordinary officer but clearly there are additional security arrangements in place that recognise that he could be a target himself specifically as a result of who he is."
Meanwhile, Nato forces in Afghanistan are to sharply scale back joint operations with the Afghan army, in response to the big rise in attacks on them by their Afghan colleagues.
A spokesman said joint working would now normally only involve large operations involving several hundred troops.
More than 50 Nato troops have been killed by Afghan soldiers and police this year, including two Britons from 3rd Battalion, The Yorkshire Regiment, on Saturday.
Prince Harry, who turned 28 on Saturday, is in Afghanistan for four months on his second tour of duty.
He was about two kilometres away with other Apache crew members during the assault on UK forces' vast, heavily-fortified base, which is also home to troops from several other countries.
"He is an Apache pilot and he faces the same risks that Apache pilots face as they go about their daily business," Mr Hammond said. "He's no more or less exposed to risk than any other Apache pilot."
Prince Harry is the first member of the Royal Family to see active combat since his uncle, the Duke of York, fought in the Falklands War.
Captain Wales, as the prince is known in the military, arrived as part of the 100-strong 662 Squadron, 3 Regiment, Army Air Corps earlier this month.
His first stint between 2007 and 2008 was cut short after 10 weeks because his presence was leaked by the international media.
For this current deployment, the Ministry of Defence has confirmed Prince Harry's role is commanding an Apache helicopter and that the threat to him is regarded as "low".
British forces have lost none of their 67 Apaches, although there have been two minor crashes.
During his previous deployment, the prince was a forward air controller directing planes bombing Taliban positions in Helmand.
Camp Bastion is one of the world's busiest airports because of the heavy helicopter and plane traffic.
But successful head-on attacks by insurgents that penetrate the perimeter fence, which is protected by hi-tech detection systems, are rare.
Saturday's attack comes amid fears of a surge in violence ahead of the withdrawal of foreign forces by 2014.