Prince Harry should not be withdrawn from his military role in Afghanistan despite an attack on the Camp Bastion military compound, a British MP says.
The Taliban claimed responsibility for Friday night's attack, saying it was carried out because Harry was on the base, and also as revenge for an anti-Islamic film.
The prince was unharmed, but two US marines were killed and several more wounded.
Later the Ministry of Defence announced that two British soldiers were shot dead on Saturday by a man wearing the local Afghan police uniform in a separate incident.
The soldiers, from 3rd Battalion The Yorkshire Regiment, were killed at a checkpoint in the south of Nahr-e Saraj district in Helmand province.
The deaths follow that of a soldier from 1st Battalion Grenadier Guards who died on Friday after his vehicle hit a roadside bomb.
Next of kin have been told.
Harry, an army captain, is based at Camp Bastion for his second tour of duty, due to last four months.
US officials said the attack on Camp Bastion was by heavily-armed insurgents and involved a range of weaponry, including mortars, rockets or rocket-propelled grenades, as well as small arms fire.
The prince 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, sources said.
Qari Yousef Ahmadi, a spokesman for the Taliban, told The Associated Press: "We attacked that base because Prince Harry was also on it and so they can know our anger.
"Thousands more suicide attackers are ready to give up their lives for the sake of the Prophet."
Conservative party MP Colonel Bob Stewart, a former commander of British troops in Bosnia, said he did not think the prince should be pulled out of Afghanistan because of the attack by the Taliban.
"To hell with them," he said.
"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.
"These things aren't set in concrete.
"If circumstances really change then we'll make different judgments.
"Capturing, killing or hurting Prince Harry would be a huge propaganda coup for the Taliban."
Major Charles Heyman, a former infantry officer and editor of The Armed Forces of the United Kingdom publication, warned against the dangers of "playing into the hands of the Taliban".
"On balance it is a difficult equation but I think he should be kept there," he said.
"If we take him away the Taliban will crow that they have just scored a major victory.
"The second point is it would affect the morale of the troops on the ground if Prince Harry was taken out just because there was a threat."
Maj Heyman said that it was not the first time Camp Bastion had been targeted.
"The Taliban have been doing these things for five years now," he said.
"Bastion is a huge complex. It is really a military city. This is one of those pinprick attacks that went right as they killed two US marines. But in most of them no-one gets hurt."
A Ministry of Defence spokesman said: "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."
The International Security Assistance Force coalition in Afghanistan said the attack happened near an airfield on the north-east side of the base, which houses US forces in Camp Leatherneck.
A number of aircraft, hangars and other buildings were hit and badly damaged.
Harry, who celebrated his 28th birthday on Saturday, arrived in Afghanistan on September 7.
He has been undergoing training to fly operations in Apache attack helicopters and is expected to start flying missions this week as a co-pilot gunner.
Camp Bastion is a huge base in the middle of the desert and is shared with US, Estonian, Danish and Afghan troops.