A US army general has been killed and two Britons were among 15 people injured in a suspected "insider attack" at a military academy in Afghanistan.
The two-star American general died after a man reportedly dressed in Afghan army uniform opened fire on foreign troops at the Afghan National Defence University in Kabul.
The International Security Assistance Force (Isaf) confirmed one of its soldiers was killed in the attack, while Germany's ministry of defence said a German brigadier general was among those wounded.
It is understood two UK service personnel were injured and they are both receiving medical treatment.
A Ministry of Defence (MoD) spokesman said: "We can confirm that a small number of UK personnel were involved in an incident at the Afghan National Defence University site today in Kabul.
"The incident is currently under investigation and it would be inappropriate to comment on the details at this time or on issues relating to personnel from other Isaf nations.
"Even in the final stages of the mission, UK and Isaf personnel will never be without risk.
"These sorts of incidents, whilst infrequent, are tragic events and we and our Isaf and Afghan partners take them extremely seriously.
"We continue to do everything possible to ensure that this threat is minimised and does not damage the trust and confidence we have worked so hard to establish with our Afghan partners."
The attack in the Qargha district of Kabul was initially reported to have happened at a British-run training academy, dubbed "Sandhurst in the sand", which will be the only remaining British military presence in Afghanistan after operations end this year.
However it is understood the incident happened in another part of the large site at Qargha, where there are several training facilities.
General Mohammmad Zahir Azimi, a spokesman for Afghanistan's defence ministry, told the Associated Press a "terrorist in an army uniform" opened fire on both local and international troops.
He said the shooter had been killed and that three Afghan army officers were injured.
US officials said the soldier killed was a two-star American general and about half of those wounded in the attack were Americans, AP reported.
A spokesman for Germany's ministry of defence said: "There has been an attack, probably through an 'inside attacker'... at 12.23pm Afghan time on August 5.
"At least 15 Isaf members were wounded, among them a German soldier who works as a brigade general. One Isaf soldier died from his injuries.
"The German general, who is not thought to be in a critical condition, is receiving treatment. His next of kin have been informed.
"An investigation into the attack is taking place."
An Isaf spokesman said: "Isaf confirms that an incident occurred today involving local Afghan and International Security Assistance Force troops at The Marshal Fahim National Defence University in Kabul City, Afghanistan.
"At this time, Isaf can confirm one Isaf service member was killed. This incident is under investigation.
"It is Isaf policy to defer casualty identification to the relevant national authorities."
The attack comes as so-called "insider attacks" - incidents in which Afghan security forces turn on their Nato partners - largely dropped last year.
In 2013, there were 16 deaths in 10 separate attacks. In 2012, such attacks killed 53 coalition troops in 38 separate attacks.