The shootout on Saturday between Afghan and American soldiers resulted in deaths on both sides but casualty details on the Afghan side were not shared.
The firefight broke after a combined US and Afghan force completed a “key-leader engagement” at the administrative headquarters of Nangarhar province’s Shirzad district, a spokesman for US forces in Afghanistan said.
“Current reports indicate an individual in an Afghan uniform opened fire on the combined U.S. and Afghan force with a machine gun,” Colonel Sonny Leggett said the statement.
“We are still collecting information and the cause or motive behind the attack is unknown at this time,” he added.
The Taliban has not claimed responsibility for the attack and senior officials were investigating if it was an insider attack often known as “green-on-blue” attacks that have been a regular feature of the conflict in Afghanistan.
“The attacker who opened fire was also killed during the clash,” said Sohrab Qaderi, a provincial council member in Nangarhar.
Qaderi said the Islamist fighter had infiltrated himself among dozens of members of the Afghan security forces involved in the joint-operation, but did not say which group the militant belonged to.
There have been fewer of these incidents in recent years as the Americans have taken more of a supporting role, with Afghan forces leading the fight.
Though, last year the top American and NATO commander in Afghanistan, General Austin Miller, survived a shooting by a Taliban infiltrator in an Afghan military uniform. A top Afghan general walking next to him was killed.
The latest shooting comes at a delicate time, with American and Taliban negotiators pushing for a peace deal.
Nangarhar, which shares a long and porous border with neighboring Pakistan, had long served as stronghold for Islamic State in Afghanistan, though the Taliban also controls parts of the province.
About 14,000 US troops are stationed in Afghanistan as part of the US-led NATO mission to train, assist and advise Afghan forces and to carry out counter-terrorism operations.