NATO said Saturday that a U.S. soldier had been killed and two others wounded in what it called an "apparent insider attack" in southern Afghanistan.
Alliance officials said the two wounded service members were in stable condition and receiving medical treatment.
A Taliban spokesman said in a statement that the attack occurred at an airbase in Tarinkot, capital of Uruzgan province.
Qari Yousaf Ahmadi would not say whether the assailant was linked to the insurgency. A "conscientious" Afghan soldier, Ahmadi said, turned his gun on "American invaders" and killed four of them.
Spokesmen for the insurgency in Afghanistan often issue death tolls that disagree with NATO information.
NATO said an investigation of the attack was underway.
The NATO-led Resolute Support mission has been in Afghanistan since January 2015 to provide training, advice and assistance to Afghan security forces. The force of 16,000 troops includes service members from 39 NATO nations and allies.