Two US Marines were killed in an attack Saturday on the military post in southern Afghanistan where Britain's Prince Harry is based, officials said, adding he was "not in any danger".
The attack, involving small arms and mortar or rocket fire, started around midnight local time (1930 GMT Friday), Master Sergeant Bob Barko of NATO's International Security Assistance Force (ISAF) told AFP.
Another ISAF spokesman said the assault was over but details including the number of attackers and whether they managed to penetrate the base were not immediately clear.
A defense official in Washington said the two dead were US Marines, speaking on condition of anonymity, while another US official described the attack as "complex", meaning it was a coordinated strike using several types of weapon.
Prince Harry has been deployed at the base as a military helicopter pilot. Taliban insurgents have vowed to kill him, saying earlier this week they had a "high-value plan" to attack the third in line to the British throne.
There was no immediate claim of responsibility after the attack, but the Islamist militia have been leading a decade-long insurgency against foreign troops.
Barko said that ISAF was assessing the extent of the damage to the camp in restive Helmand province, one of the toughest battlefields in the 10-year war, but the prince was not thought to have been affected.
"The information we have is that he was not in any danger," he said.
The 27-year-old prince will spend four months based at the heavily fortified Camp Bastion.
In 2008, Harry was hastily withdrawn from Afghanistan when a news blackout surrounding his deployment, on the ground directing aircraft in attacks on Taliban positions, was broken.
This time, however, the military has released photographs and video of him in Afghanistan from the start.
Britain's Ministry of Defence said any risk "has been, and will continue to be, assessed".
NATO has some 117,000 troops in Afghanistan fighting the Taliban's decade-long insurgency alongside government forces.
Most of the NATO troops are set to withdraw by the end of 2014 in a US-designed transition process that will put Afghan security forces in charge of security for their war-battered country.
The process is already under way with security responsibilities of about half of the Afghan population transferred to the local security forces.
The Taliban have stepped up their attacks in recent months as part of efforts by the insurgency to undermine the transition process.
Helmand province, in the troubled south, was the focus of a 30,000-strong troop surge announced by the United States in 2009 designed to quell the Taliban-led insurgency once and for all.
A total of 327 international troops have been killed in Afghanistan so far this year, according to the iCasualties website, 250 of them American. The toll does not include those who died in the latest attack.