A US soldier and a US civilian were killed Wednesday by an unknown gunman in the Afghan capital Kabul, the NATO military alliance said.
"One US service member and two US civilians also sustained wounds and are currently stable," said a NATO statement.
Afghan Ministry of Defence spokesman Dawlat Waziri said earlier that the assailant was an Afghan army soldier.
The assailant was killed after an exchange of fire in the Rishkhor neighbourhood of the capital, which houses an Afghan Special Forces training centre, as well as a small contingent of NATO's Resolute Support mission advisors, said Waziri.
"Anytime we lose a member of our team, it is deeply painful," said General John W. Nicholson, the commander of NATO and US forces in the country.
Dozens of international soldiers and advisors have been killed in attacks by Afghan security forces on their own allies.
The widely quoted "Long War Journal" blog has registered 92 such attacks since 2008. 150 international soldiers were killed and 187 wounded.
Such attacks are often due to cultural misunderstandings or personal clashes. Taliban militants have also often managed to infiltrate the ranks of the Afghan security forces to carry out insider attacks in the past few months.