A Taliban commander has told Sky News that Prince Harry was the primary target of an attack on a major Allied military base in Afghanistan.
Two US Marines died and several others were hurt when militants launched the attack on Camp Bastion late Friday.
Prince Harry was more than a mile away with other crew members of the Apache attack helicopters when the attack took place, sources said. He was unharmed.
The Taliban initially claimed that the attack was carried out in revenge for a low-budget YouTube film which allegedly motivated rioters in Libya to kill the US ambassador and three other Americans this week.
But speaking from Cairo, Sky News Chief Correspondent Stuart Ramsay said: "It appears that rather than the attack being linked to the video, it was actually Prince Harry that was the target."
"This is quite a development, that the Taliban is confirming Prince Harry was the primary target."
Sky News sources said 18 Taliban militants died in the attack and another was captured.
US officials said the heavily-armed insurgents used a range of weaponry, including mortars, rockets and small arms fire.
A spokesman for the International Security Assistance Force (ISAF) coalition in Afghanistan said the attack happened near an airfield on the north-east side of the base, which houses American forces in Camp Leatherneck.
A number of aircraft, hangars and other buildings at the base were hit and badly damaged by insurgent fire.
The Ministry of Defence confirmed the attack, adding that "the incident was contained with a number of insurgents killed as a result".
"A clearance operation including UK and ISAF forces is being conducted and we are in the process of accounting for our people, who were subject to a lockdown as is the case when a base is attacked," the MoD said in a statement.
"ISAF have confirmed that two US Marine Corps service personnel were killed and that there were some other ISAF casualties.
"With daylight, work to assess and investigate the attack continues and further details will be made as and when available."
Harry, who celebrates his 28th birthday today, arrived in Afghanistan last Friday on his second tour of duty in the country.
Major Charles Heyman, a former infantry officer and military analyst, said he believed the Taliban's motive was the anti-Islamic video rather than to target Harry.
"On balance it is probable that they (the Taliban) are grandstanding a bit, but the real reason that attack was mounted was to coincide with all the riots and all the protests that have been going on across the world," he told Sky News.
Major Heyman added that military officials should not withdraw the Prince Harry from Afghanistan.
"On balance I think the right move is to keep him there and let's just get on with it and get on with what we have to do for the next year and a half or so," he said.