By Abdul Qadir Sediqi and Idrees Ali
KABUL/WASHINGTON (Reuters) - Two U.S. soldiers and an Afghan soldier were killed when an individual in an Afghan uniform opened fire on them with a machine gun in eastern Afghanistan, the U.S. military and two senior Afghan officials said on Sunday.
The shootout on Saturday wounded six U.S. service members and three Afghan soldiers.
The firefight broke out after a combined U.S. and Afghan force completed a "key-leader engagement" at the administrative headquarters of Nangarhar province's Shirzad district, a spokesman for U.S. 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 in a 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 whether it was an insider attack - often known as "green-on-blue" attacks that have been a regular feature of the conflict in Afghanistan.
Afghanistan's defense ministry, in a statement on Sunday, said the attacker opened fire on Afghan National Army members and U.S. forces, killing one Afghan soldier and wounding three others alongside the American soldiers.
The Pentagon identified the Americans killed on Sunday as Sgt. 1st Class Javier Jaguar Gutierrez, 28, of San Antonio, Texas, and Sgt. 1st Class Antonio Rey Rodriguez, 28, of Las Cruces, New Mexico.
The ministry set up an investigations team headed by the country's chief of army staff to investigate the attack.
"Attacks such as this by our enemies fail to have negative effects on the friendship and spirit of cooperation and between the Afghan National Security Forces and the U.S. military," the ministry said.
Sohrab Qaderi, a provincial council member in Nangarhar, said the attacker was killed in the clash.
He said the Islamist fighter had infiltrated the Afghan security forces involved in the joint operation, but did not say which group the militant belonged to.
There have been fewer insider attacks in recent years as the Americans have taken more of a supporting role, with Afghan forces leading the fight.
Last year the top American and NATO commander in Afghanistan, General Austin Miller, survived a shooting by a Taliban infiltrator wearing an Afghan military uniform. A top Afghan general walking beside 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 the Islamic State militant group, though the Taliban also controls parts of the province.
About 14,000 U.S. troops are stationed in Afghanistan as part of the U.S.-led NATO mission to train, assist and advise Afghan forces and to carry out counter-terrorism operations.