Defence Secretary Philip Hammond admitted Prince Harry was moved to a guarded location when the attack on Camp Bastion began.
He told BBC 2's Newsnight:
Clearly there are fall-back plans and I can't go into the detail of them - but 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.
Clearly if we had a VIP in theatre and frankly if I was there or, Jeremy, if you were there in Camp Bastion and there was a breach of the perimeter security, anybody who might, by nature of who they are, be a target, they would be put in a secure location.
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.
Conservative MP Colonel Bob Stewart, a former commander of British troops in Bosnia, has said that he does not think Prince Harry should be pulled out of Afghanistan because of Friday's Taliban attack.
He said: "To hell with them. Harry wants to go there and our soldiers want him there. He should stay."
But Col Stewart stressed the security considerations regarding the deployment of the Prince were flexible.
Stewart continued: "These things aren't set in concrete.
"If circumstances really change then we'll make different judgments."
He added: "Capturing, killing or hurting Prince Harry would be a huge propaganda coup for the Taliban."
The International Security Assistance Force (ISAF) has issued a statement regarding the attack on Camp Bastion, Afghanistan.
– ISAF Spokesperson
ISAF can confirm that last night, approximately 20 insurgents breached the Camp Bastion/Leatherneck perimeter and attacked ISAFpersonnel and equipment on the Camp Bastion airfield with small arms fire,indirect fire and suicide vests, killing two and wounding several ISAF servicemembers.
ISAF forces reacted to the assault, returned fire andkilled 18 of the insurgents, defeating the attack. ISAF also wounded one otherinsurgent attacker, who is currently in ISAF custody and being treated in anISAF medical facility.
Camp Bastion is currently secure.
An MoD spokesman has said the "threat to all our service personnel is continually assessed" after an attack on the Camp Bastion military compound in Afghanistan killed two US Marines and wounded several more.
The threat to all our service personnel is continually assessed and all measures taken to mitigate it.
As we stated last week, the deployment of Captain Wales has been long planned and the threat to him and others around him thoroughly assessed.
We stated that any risk posed by his deployment, based on the capability, opportunity and intent of the insurgency, is continually reviewed.
– MoD spokesman
As Isaf has confirmed, last night's attack was dealt with swiftly by Isaf personnel, including UK forces, and a number of insurgents were killed.
A clearance operation has been conducted and work to assess and investigate the incident continues.
A Taliban chief has told Sky News that Prince Harry was the primary target in the attack on Camp Bastion in which two U.S marines died.
Prince Harry celebrates his 28th birthday today.
The young Royal is unharmed after an attack on the Camp Bastion military compound in Afghanistan in which two US Marines were killed and several more wounded.
Harry was about two kilometres away with other crew members of the Apache attack helicopters, of which he is a co-pilot gunner, when the attack took place.
The Prince, an Army captain, is based at the compound in Helmand province in the south of Afghanistan for his second tour of duty.
US officials said the attack last night was by heavily-armed insurgents and involved a range of weaponry, including mortars, rockets or rocket-propelled grenades, as well as small arms fire. sources said.
There are no indications of any British fatalities or injuries.
Two US Marines have been killed and several more troops wounded after Camp Bastion in Afghanistan came under attack
A US official said the attack at the base in Helmand province involved a range of weaponry, possibly including mortars, rockets or rocket-propelled grenades and small arms fire.
Early indications were that it was on the north-east side of the base, which houses American forces in Camp Leatherneck.
A Ministry of Defence spokesman in London said: "We are aware of an incident that has taken place at Camp Bastion, which is currently being dealt with."
Prince Harry is currently based at Camp Bastion on his second tour of duty in Afghanistan, which is due to last four months.
The 27-year-old Army captain arrived last Friday.
Camp Bastion is a huge base in the middle of the desert shared with US, Estonian, Danish and Afghan troops.
At least two Americans have been killed in a "complex" Taliban attack at Camp Bastion, the main Allied base in Afghanistan, US officials have told Reuters.
An American official told the Associated Press the victims were marines.