Six others were wounded in the fight, which took place on Feb. 8 in Sherzad district, Nangarhar province, according to U.S. Forces- Afghanistan. The wounded service members are being treated at a U.S. facility, according to a statement.
On Sunday, the Pentagon identified the two Americans killed 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. Both soldiers, who were assigned to 3rd Battalion, 7th Special Forces Group (Airborne), were posthumously promoted after the attack.
Guttierez was born in Jacksonville, North Carolina, and enlisted in the Army in 2009 as an infantryman. He was stationed at Fort Bragg, assigned to the 2nd Battalion, 504th Parachute Infantry Regiment and then in 2012, he attended the Special Forces Assessment and Selection there, and was selected to attend the Special Forces Qualification Course. He graduated in 2015 as a special forces communications sergeant and was assigned to Eglin Air Force Base.
"Upon completing a key-leader engagement at the district center, current reports indicate an individual in an Afghan uniform opened fire on the combined U.S. and Afghan force with a machine gun," the U.S. Forces- Afghanistan statement said.
"We are still collecting information and the cause or motive behind the attack is unknown at this time," the statement said. "The incident is under investigation."
The Afghan Defense ministry said in a statement, "Attacks such as this by our enemies fail to have negative effects on the friendship and spirit of cooperation and between the ANDSF and U.S Military forces. We will continue our fight against terrorism together."
"The leadership of the Ministry of Defense extends condolences to the families and friends of all the brave martyred force members and prays for the quick recovery of the injured members of the forces," the statement continued.
Four other U.S. service members have been killed in Afghanistan this year, two in a roadside explosion and two others when their U.S. Air Force E-11B aircraft crashed because of an apparent mechanical issue.
Last year saw increased levels of violence against American troops in Afghanistan that made it the deadliest for U.S. forces in that country in five years.
There are about 13,000 American troops in Afghanistan, most of whom are involved in the training and advisory mission to help the Afghan security forces in their fight against the Taliban and the Islamic State affiliate. The remainder are engaged in a counter-terrorism mission against those two groups.
The Trump administration restarted peace talks in December with the Taliban that had broken down in September following the death of a U.S. soldier in Kabul.
U.S. officials have said that the administration is considering a unilateral reduction in American forces down to 8,600 but that no presidential decision has been made.