An American soldier and an Afghan soldier were killed when a firefight broke out between Afghan and NATO coalition forces at a compound where a senior US diplomat met a provincial governor in eastern Afghanistan, police and US sources said.
A handful of others from both sides were wounded in the shooting, which erupted shortly after the diplomat left the compound aboard a helicopter, according to US and Afghan sources.
The NATO soldiers involved in the incident were American, according to Afghan police, and had been leaving the venue to return to Camp Gamberi in east Afghanistan where they were stationed.
NATO issued a statement saying one of its soldiers had been killed, without divulging the nationality, though a US source told Reuters that the dead soldier was American and two Americans had been wounded in the clash.
Two Afghan soldiers were also injured in the shoot out and it was unclear who had fired first, police said, adding that an Afghan soldier was being questioned. They had no other details on the American casualties.
The US embassy in Kabul issued a statement on the incident without referring to casualties.
"We are aware that there was an exchange of gunfire involving Resolute Support service members... All Chief of Mission personnel of the visiting party are accounted for," the US embassy said.
The frequency of "insider attacks" in Afghanistan has fallen sharply this year as most foreign forces withdrew from the country in 2014.
A small contingent of around 12,000 NATO troops remains in Afghanistan to train Afghan forces after the combat mission officially ended last year.
Wednesday's incident was the first since January, when three US military contractors were killed by an Afghan soldier in the capital Kabul.
In the final years of the war, dozens of incidents seriously eroded trust between Afghan forces and their international allies, forcing the coalition to scale back interaction with government troops.
The Taliban have sometimes claimed insider attacks reflect their ability to infiltrate the enemy, but Afghan and coalition forces say incidents more often arise over misunderstandings or arguments between troops.