The US military has confirmed the death of an American service member in eastern Afghanistan, bringing the number of American troops killed in Afghanistan in the long-running conflict to 2,000.
The international coalition in Afghanistan said earlier that one of its service members was killed in a suspected insider attack by Afghan forces.
A US official said that the dead service member was American.
The number of American dead reflects an Associated Press count of those members of the armed services killed inside Afghanistan since the US-led invasion on October 7 2001.
At least two Afghan soldiers were also killed in the attack at an Afghan army checkpoint in Wardak province, said Shahidullah Shahid, a provincial government spokesman.
An Afghan soldier turned his gun on the Americans and started shooting, Mr Shahid said. He said the checkpoint was in Sayd Abad district, just outside a joint US-Afghan base.
"Initial reports indicate that a misunderstanding happened between Afghan army soldiers and American soldiers," Mr Shahid said. He said investigators had been sent to the site.
An Afghan military spokesman declined to comment.
Afghan soldiers and policemen - or militants in their uniforms - have gunned down more than 50 foreign troops so far this year, eroding the trust between coalition forces and their Afghan partners.
An equal number of Afghan policemen and soldiers also died in these attacks, giving them reason as well to be suspicious of possible infiltrators within their ranks.