Earlier on Saturday, Attahullah Khogyani, a provincial spokesman in Nangarhar province, said that two other soldiers were also injured in the attack, which was carried out by an Afghan soldier in the Achin district, where US and Afghan forces are carrying out joint operations against Taliban and Islamic State (IS, formerly ISIS/ISIL) militants.

“Today at around noon an Afghan commando opened fire on US troops in Achin district, killing two American soldiers. The soldier was also killed in the return fire,” Khogyani told AFP.

A Taliban spokesman claimed the shooter was a part of the militant group and had killed four Americans and injured several more, but this has yet to be confirmed by government sources. The Achin district in eastern Nangarhar province, where the attack took place, is also thought to be a stronghold of IS.

“The cause of the shooting is not clear. An investigation has already begun,” Khogyani said, according to Reuters.

This type of incident, known as a ‘green-on-blue’ attack, is not uncommon in Afghanistan. In March, three American soldiers were wounded by an Afghan soldier at a base in Helmand province.

Members of the Afghan security forces, including the army and police, are often undisciplined, corrupt and/or have conflicting loyalties, which leaves these institutions vulnerable to infiltration by the Taliban and other militant groups. In the past, the Afghan government has been heavily criticized for its poor vetting process to weed out unsuitable or dangerous candidates.

The attack comes soon after a case of friendly fire against Afghan forces. On Saturday, Afghan officials also confirmed that three policemen had been killed and two others wounded when a US aircraft opened fire during an operation in Helmand Province.

“We would like to express our deepest condolences to the families of the ABP [Afghan Border Police] members affected by this unfortunate incident,” read a statement from the US military, as quoted by Reuters.