No group has so far claimed responsibility for Wednesday's attack in Helmand, which coincided with the fall of a strategic district in the volatile opium-rich province to Taliban insurgents.
"Two Resolute Support (NATO) service members died early this morning when two individuals wearing Afghan (military) uniforms opened fire on their vehicle at an (Afghan security forces) compound in Helmand province," a NATO statement said.
"Resolute Support service members returned fire and killed the shooters," it added, without revealing the nationalities of the foreign soldiers. However, US defense officials later confirmed that the victims were Americans. This brings to four the number of US citizens killed in attacks over the past fortnight.
So-called "green-on-blue" attacks -- when Afghan soldiers or police turn their guns on international troops -- have been a major problem during NATO's long years fighting alongside Afghan forces.
In another development, Taliban insurgents overran the key northern district of Musa Qala after fierce fighting, according to a provincial council member.
Officials fear that the fall of the district, once a key NATO position, could help the militants topple adjoining districts, tightening their grip on northern Helmand.
"Many people have been killed or injured in the fighting. We barely made it out of the district alive," said Mullah Abdul Jalil, a resident of Musa Qala who fled with his family to the provincial capital Lashkar Gah.
Taliban insurgents are ramping up their summer offensive launched in late April amid their simmering leadership dispute.
Mullah Akhtar Mansour was named as the insurgents' new chief in late July but the power transition has been acrimonious.
Surge in attacks
Wednesday's insider attack was the first such incident since Mansour's ascension following the announcement of the death of longtime leader Mullah Omar.
The NATO statement did not give the precise location of the attack, which highlights long-simmering tensions between Afghan and foreign forces.
Western officials say most such incidents stem from personal grudges and cultural misunderstandings rather than insurgent plots.
The killings have bred fierce mistrust between local and foreign forces even though their number has declined in recent years.
The last insider attack was in April, when an American soldier was killed in a firefight between US and Afghan troops in eastern Afghanistan.
US Defense Secretary Ashton Carter at the time said the soldier's killing showed that work remains to shore up Afghan forces in the "dangerous" country.
NATO ended its combat mission in Afghanistan last December and pulled out the bulk of its troops although a 13,000-strong residual force remains for training and counter-terrorism operations.
One of the worst insider attacks took place last August when US Major General Harold Greene was killed -- the most senior American military officer to die in action overseas since the Vietnam War.
NATO troops have adopted special security measures in recent years to try to counter the threat.
The Afghan military, which has been built from scratch since the fall of the Taliban regime in 2001, has also struggled with insider attacks, high casualty rates and mass desertions.
Stretched on multiple fronts as the insurgency expands, Afghan forces are facing their first fighting season without the full support of NATO forces.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ