
KABUL — An Afghan soldier opened fire on US troops in a restive eastern province of Afghanistan on Saturday, killing three and injuring another, authorities said.
The shooting occurred in the Achin district of Afghanistan’s Nangahar province, according to a US defense official, an area where both Taliban and Islamic State insurgents are contesting territory.
The Taliban claimed responsibility for the attack.
Early media reports suggested the assailant was an elite Afghan commando, although that is not confirmed. The gunman was killed by American troops, according to a security official in the province.
Achin has been the site of heavy fighting in recent months as US Special Operations forces — including elite Army Rangers and Green Berets — have been working alongside Afghan commandos to force the Islamic State from the area. Three US soldiers had died there this year before Saturday’s shooting.
The Taliban are also active in the area, and there have been reports of clashes between the two insurgent groups in recent weeks. A Taliban spokesman sent a text message to journalists Saturday claiming the alleged assailant was an ‘‘infiltrator’’ of the Afghan army.
Allied commanders provided limited details.
‘‘We are aware of an incident in Eastern Afghanistan. We will release more information when appropriate,’’ Douglas High, the public affairs officer for Operation Resolute Support, the NATO mission in Afghanistan, said in an e-mail statement to The Post.
Also Saturday, two Afghan border policemen were killed by US aircraft fire during a joint operation in the southern province of Helmand. The US military in a statement apologized for the deaths and said the incident was under investigation.
The three previous US soldiers’ deaths in Achin make up the entirety of US combat fatalities in Afghanistan in 2017. In early April, Staff Sergeant Mark R. De Alencar, 37, was killed by small-arms fire, followed by Sergeant Joshua P. Rodgers, 22, and Sergeant Cameron H. Thomas, 23, at the end of the month.
Rodgers and Thomas were killed during a joint Afghan-US nighttime raid on an Islamic State headquarters building. The Pentagon is investigating whether they were mortally wounded by friendly fire.
The raid resulted in the death of the emir of the Islamic State’s branch in Afghanistan, Abdul Hasib, according to the Pentagon and Afghan officials. More than 30 other militants were also killed.
Achin was the also site where US Special Operations troops in April dropped the GBU-43, a 22,000-pound bomb known as the MOAB, on a purported cave complex where insurgents were believed to be hiding.
The blast flattened a swath of the area. While Afghan officials said dozens of militants were killed, the Pentagon has remained mum on the effects.
The Afghan branch of the Islamic State, known as ISIS-K, is mainly composed of militants pulled from other groups and has turned into one of the main counterterrorism efforts for the United States in Afghanistan.
Although military officials say the group is far smaller than it was at its height in 2015, an estimated 600 to 800 militants, located mainly in remote mountainous areas, continue to pose an ample threat to US and Afghan troops.
President Ashraf Ghani of Afghanistan surprised everyone at a peace conference Tuesday when he said up to 11,000 foreign fighters have penetrated Afghanistan, a number far higher than previous estimates by the US military and his own government.
The deaths come as the Trump administration is weighing whether to send more US troops to Afghanistan, including a proposal to send American US Special Operations forces to train up to 17,000 new members of Afghan special forces.
The Afghan special forces units have quickly become the most reliable force in the more than 15-year war, American officials believe. Once trained to conduct raids much like their US counterparts, the majority of Afghan commando units have turned into a backbone force for the fledgling Afghan army.
The deteriorating security situation in Afghanistan was underscored by a massive truck bomb blast May 31 in a heavily patrolled diplomatic area of the capital Kabul that killed more than 150.
The bomb blast was one of the worst such attacks in the country since the arrival of American troops in 2001. That was followed by violent antigovernment protests that left six dead June 2 and a triple-suicide bombing during funeral prayers for one of the protesters on the following day.