Updated

Three U.S. soldiers were killed Saturday and one wounded when an Afghan army solider opened fire on them in an attack in eastern Afghanistan for which the Taliban claimed responsibility, officials said.

Military officials initially identified the victims as Army Rangers before clarifying Monday that they were soldiers.

Attahullah Khogyani, a spokesman for the provincial governor in Nangarhar province, told Fox News the insider attack took place in the Achin district, where the U.S. military dropped the "Mother of All Bombs" earlier this year to wipe out an ISIS cave complex.

He said two American soldiers were killed and two wounded.

“The Afghan army soldier was killed in return fire,” he said.

Taliban spokesman Zabihullah Mujahid said in a statement that a Taliban loyalist had infiltrated the Afghan army "just to attack foreign forces."

White House Deputy Communications Director Raj Shah said President Trump had been informed of the situation.

Such insider attacks have happened before in Afghanistan. In March, another Afghan soldier was killed after he opened fire on foreign forces at a base in Helmand province, wounding three U.S. soldiers.

Saturday’s attack comes as the White House is weighing a decision to send up to 5,000 more soldiers to Afghanistan. Roughly 8,400 American soldiers are in Afghanistan now with most of them helping to train the Afghan security forces fighting the Taliban.

Officials say that adding to the number of U.S. and NATO troops in Afghanistan would free up more Special Operations forces to focus on killing more top Taliban, ISIS and Al Qaeda leaders.

Eastern Afghanistan is where U.S. Army Green Beret, Staff Sgt. Mark De Alencar and U.S. Army Rangers were killed in separate combat missions in April targeting ISIS extremists.

Following De Alencar’s death, the Air Force bombed the ISIS cave complex in Achin with the MOAB, or the “mother of all bombs.”

The decision to drop the largest conventional bomb in the Air Force's inventory was made by the top U.S. general in Afghanistan and not the president.

Since taking office, Trump has eased restrictions on the use of air power, according to senior defense officials.

As a result the U.S. military has stepped up airstrikes in Afghanistan. In April, there were more bombs dropped than in any one month in the past five years.

Fox News' Lucas Tomlinson and The Associated Press contributed to this report.