Three U.S. soldiers were killed and one wounded Saturday. The soldiers were killed by an ally Afghan soldier who opened fire on them during a joint U.S.-Afghan military operation in eastern Afghanistan, according to the New York Times.

The soldiers were shot in an “inside attack,” when a member of the Afghan Security Forces opened fire on the four men. The Afghan soldier was killed by return fire.

Read: Donald Trump’s New Military Policy Could Reverse Obama’s Legacy In Afghanistan

The attack happened in the Achin District of Nangarhar Province. U.S. soldiers there are fighting alongside their Afghan counterparts against Taliban and ISIS-affiliated insurgents.

The Taliban has taken credit for the attack.

"A Mujahid (freedom fighter) infiltrator of the Islamic Emirate who had enrolled himself in the Kabul government's army attacked American soldiers in Lata Band area of Achin district in Nangarhar province today in the afternoon," said a written statement from the Taliban acquired by CNN. "The American invaders were there to support their Afghan slaves."

Inside attacks like this are called green on blue attacks because of a NATO color coding system, reports the New York Times.

Vice President Mike Pence reacted to the incident during an anti-Obamacare event in Wisconsin.

"On my way here I was informed that U.S. service members were killed and wounded in an attack in Afghanistan," Pence said. "The president and I have been briefed; the details of this attack will be forthcoming. But suffice it to say, when heroes fall, Americans grieve. And our thoughts and prayers are with the families of these American heroes."

A similar insider attack wounded three U.S. soldiers in March in Helman province, according to ABC News. Green on blue attacks used to be much more common, but have become rarer as there are fewer coalition forces in Afghanistan and U.S. forces have put in place new safety procedures after starting joint missions with Afghan troops. ABC News also reports that there are currently 8,400 American troops still in Afghanistan training Afghan forces and helping them in military operations.

Two other U.S. soldiers were killed in the Achin District in late April, according to CNN, during a raid targeting ISIS, and in early April an Army Special Forces soldier was killed there while fighting the terrorist group.

Read: What Is The GBU-43 Bomb? 'MOAB' Dropped By U.S. On ISIS Complex In Afghanistan

The Achin District is home to a U.S. army base that is tasked with ant-terrorism operations. Achin is home to between 600 and 800 Islamic fighters according to the Associated Press. In April, the U.S. Air Force dropped a bomb in the region nicknamed the “mother of all bombs.” The weapon was packed with 11 tons of explosive and was aimed at destroying an ISIS tunnel.

The New York Times also reports that at least two Afghan police officers were killed and six wounded in a separate incident Saturday. The police were killed in a friendly fire incident when a U.S. airstrike occurred on an Afghan border post. American forces were working in conjunction with Afghan forces in the Helmand province when the incident occurred.