KABUL, Afghanistan — The U.S. military says two American soldiers were killed and six wounded in a so-called insider attack in eastern Afghanistan. 

U.S. officials say an Afghan dressed in an Afghan army uniform opened fire late Saturday in eastern Afghanistan's Nangarhar province. A member of the Nangarhar Provincial Council tells The Associated Press that the gunman was killed. 

The Department of Defense has identified the two deceased soldiers 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 Defense Department said the two soldiers were assigned to 3rd Battalion, 7th Special Forces Group (Airborne), Eglin Air Force Base in Florida. 

In a statement on Twitter, Sen. Marco Rubio said of the soldiers, "We are all heartbroken for their families, friends & loved ones."

The 7th Special Forces Group released a statement on Twitter saying, "The families of the deceased and wounded are being notified."

There have been numerous attacks by Afghan national army soldiers on their allied partners over 18 years of America's protracted war in Afghanistan. 

Six U.S. service members have been killed in Afghanistan this year.  Last year, 22 U.S. service personnel died from "hostile" action.

In a statement, reported on by AP, the U.S. military said the individual "opened fire on the combined U.S. and Afghan force with a machine gun. We are still collecting information and the cause or motive behind the attack is unknown at this time."

RELATED: Official: American citizen believed kidnapped in Afghanistan

Washington’s peace envoy Zalmay Khalilzad has been meeting with Taliban representatives in Qatar recently to find an end to the war in Afghanistan. Khalilzad is seeking an agreement to get a peace deal signed and start negotiations among Afghans on both sides of the conflict.