Three Nato soldiers killed by a gunman in a police uniform in Helmand, southern Afghanistan, were British, the Ministry of Defence has said.
Two served with the 1st Battalion Welsh Guards and one with the Royal Corps of Signals. Next of kin have been told.
More than 20 foreign personnel have been killed in so-called rogue shootings in Afghanistan this year.
The Nato-led Isaf force are training Afghan counterparts ahead of a handover of security responsibility by 2014.
The gunman was injured and later detained, Nato said.
Observers say the rogue shootings have eroded morale among foreign forces.
BBC defence correspondent Caroline Wyatt says nobody knows why there has been a surge in rogue shootings.
She says thorough background checks are carried out on Afghan troops and police in a bid to ensure that people are not sympathetic to insurgent factions.
Isaf, Nato's force in the country, said in a statement on Sunday: "An individual wearing an Afghan National Civil Order Police uniform turned his weapon against International Security Assistance Force service members in southern Afghanistan today, killing three service members,"
Public opinion against the foreign forces in Afghanistan was inflamed by revelations, in February, that US troops burned copies of the Koran at a base in Afghanistan - reportedly by accident.
The shooting of 16 Afghans by a US soldier in March has also created resentment.