Three U.S. soldiers were killed and one other was wounded Saturday in eastern Afghanistan when an Afghan soldier opened fire on them, U.S. officials confirmed to NBC News.

The shooter — identified as a member of the Afghan National Army's Commando Forces — was killed in return fire, officials added.

The incident occurred during a joint U.S.-Afghan military operation in the Achin district of Nangarhar province, according to the provincial governor's spokesperson.

On Monday morning, the Department of Defense released the names of the soldiers who were killed. They are: Sgt. Eric M. Houck, 25, of Baltimore, Maryland; Sgt. William M. Bays, 29, of Barstow, California; and Corporal Dillon C. Baldridge, 22, of Youngsville, North Carolina.

The soldiers were assigned to Headquarters and Headquarters Battery, 3rd Battalion, 320th Field Artillery Regiment, 101st Airborne Division (Air Assault) and Company D, 1st Battalion, 187th Infantry Regiment, 3rd Brigade Combat Team, 101st Airborne Division (Air Assault), Fort Campbell, KY.

An Afghan Army soldier mans a check point in Jalalabad, the provincial capital of Nangarhar province, Afghanistan on June 10, 2017. Ghulamullah Habibi / EPA

The wounded U.S. soldier was evacuated for medical treatment, the Pentagon said in a statement Saturday, without further detail of the injuries.

Officials said the Americans were killed in an apparent insider, or so-called "green-on-blue," attack by an Afghan ally soldier on U.S. service members.

President Donald Trump was briefed on the "emerging situation" in Afghanistan, White House deputy communications director Raj Shah said earlier Saturday.

Vice President Mike Pence at an event in Milwaukee on Saturday said that he and the president had been briefed and details of the attack would be forthcoming.

"When heroes fall, Americans grieve and our thoughts and prayers are with the families of these American heroes," Pence said.

3 U.S. soldiers were killed in eastern Afghanistan today. One was wounded & evacuated for medical treatment. Our prayers go out to them. — Sean Spicer (@PressSec) June 10, 2017

The attack follows one in March in which three American soldiers were shot and wounded by an Afghan soldier on a base in Helmand province, officials said. That Afghan soldier was also killed following the incident.