According to Attaullah Khogyani, the spokesman for the governor of Nangarhar Province, an Afghan Army commando opened fire on the American soldiers in the Pekhe area of the district, and the attacker was killed by other soldiers at the scene.

Zabihullah Mujahid, a spokesman for the Taliban, wrote in a WhatsApp message that the attacker was a Taliban infiltrator.

Afghan officials said that an American airstrike on a border outpost in southern Helmand Province killed two border police officers and wounded six others late Friday night or early Saturday morning. A news release from the American military on Saturday confirmed an episode in the area overnight in which “personnel from the Afghan National Defense and Security Forces were killed and wounded.”

According to Omar Zwak, the spokesman for the governor of Helmand Province, the airstrike on the border police post took place in the Nad Ali District. While initial reports said that two policemen had been killed and six wounded, an investigating team sent to the area found that “the death toll is rising,” Mr. Zwak said. Another official, Bashir Ahmad Shakir, head of the provincial council’s security committee, said that other reports, not yet confirmed, said that as many as eight policemen had been killed. Both officials said the episode had been the result of an Afghan commando operation in the area fighting Taliban insurgents.

The episode in Helmand, like the one in Nangarhar, involved American forces working in partnership with Afghan commandos, but there was no indication that they were connected.