Three U.S. troops were wounded on Sunday after an Afghan soldier opened fire on them at a base in the southern province of Helmand, the NATO-led Resolute Support mission said.
The soldiers are receiving medical care, the NATO-led training and assistance mission said on Twitter.
A spokesman for the Afghan military in the south of the country said the Afghan special forces soldier was shot dead after firing at the Americans at Camp Shorab air base at around 3 p.m. local time.
"The guard lost his life in exchange of fire," Mohammad Rasoul Zazai told Reuters.
So-called "green-on-blue" insider attacks by Afghan soldiers on international service members were a major problem several years ago, but now occur less frequently after security measures were improved and the number of foreign troops in the country fell sharply.
Most foreign combat troops withdrew from Afghanistan at the end of 2014, 13 years after they ousted the Taliban from power, but around 13,000 NATO-led soldiers remain to help advise and train Afghan forces fighting a revived Taliban insurgency.
Last May two Romanian soldiers were killed and a third wounded after two members of a local Afghan police unit they were training shot them.
Camp Shorab in Helmand, previously known as Camp Bastion, is a major former U.S. and British base now run by the Afghan army.
Most popular: Google Apologizes to Brands After Extremist Ad Issues
Helmand has been one of the most fiercely contested regions of the country, with nearly 1,000 coalition troops killed there since the U.S.-led military intervention in 2001.
The U.S. said in January that about 300 Marines would be sent to Helmand to assist Afghan forces battling the Islamist insurgents in intelligence and logistics matters.
More from Newsweek