A female Afghan police officer shot dead a NATO civilian adviser inside Kabul police headquarters on Monday, officials said, in the first "insider" attack by a woman.
It was the latest in a series of such attacks that have seriously undermined trust between NATO forces and their Afghan allies in the fight against hardline Islamist Taliban insurgents.
A spokesman for NATO's International Security Assistance Force (ISAF) said the adviser died of his wounds and the female police officer who shot him had been detained.
In another insider attack on Monday, the head of a local police post in the northern province of Jawzjan shot dead five of his colleagues and ran away to join the Taliban, said provincial police chief Abdul Aziz Ghairat.
Interior ministry spokesman Sediq Seidiqqi confirmed the Kabul incident and said an investigation was under way, while a senior security official speaking to AFP anonymously said the victim was a male adviser from NATO.
A police officer at the scene who refused to give his name told AFP the shooting happened in the courtyard of the heavily-guarded headquarters in central Kabul.
"I heard gunshots and than I saw the shooter -- a woman wearing police uniform -- running and firing into the air with her pistol," the officer said.
"I ran after her, jumped on her and put my gun to her head and told her not to move. She gave up and I arrested her and I took her weapon."
NATO is aiming to train 350,000 Afghan soldiers and police by the end of 2014 as it transfers all security responsibilities to President Hamid Karzai's local forces.
The Afghan conflict has seen a surge in insider attacks this year, with more than 50 ISAF soldiers killed by their colleagues in the Afghan army or police, though most have happened on military bases and not in the capital.
US special forces suspended training for around 1,000 Afghan Local Police recruits in September to re-investigate current members for possible links to the Taliban, after the rise in insider attacks.
Training for the national police was not affected.
The Washington Post reported that the suspension came amid concerns that recruitment guidelines were not being followed properly in the rush to swell local police numbers.
NATO says about a quarter of insider attacks are caused by Taliban infiltrators, but the rest stem from personal animosities and cultural differences between Western troops and their Afghan allies.
In the most recent previous attack, a British soldier was killed by an Afghan soldier on a base in the restive south on November 11.
The unprecedented number of attacks, referred to as "green-on-blue" by the military, comes at a critical moment in the 11-year war as NATO troops prepare to withdraw by the end of 2014.
NATO top brass have admitted the seriousness of the phenomenon.
ISAF commander General John Allen has said that just as homemade bombs were the signature weapon of the Iraq war, in Afghanistan "the signature attack that we're beginning to see is going to be the insider attack".
Efforts to tackle the issue include orders that NATO soldiers working with Afghan forces should be armed and ready to fire at all times, even within their tightly protected bases, and the issuing of cultural guidelines.
The insider attacks have added to growing opposition to the war in many Western countries providing troops to the US-led NATO force, with opinion polls showing a majority want their soldiers out as soon as possible.
NATO has said, however, that the attacks will not force it to bring forward its scheduled withdrawal of all combat troops by the end of 2014.