An Afghan National Army commando takes part in the battle against Taliban militants in Kunduz last month. (Bashir Khan Safi/AFP/Getty Images)

At least 26 Afghan civilians were killed and many others injured in airstrikes early Thursday while NATO and ­Afghan forces were battling ­Taliban fighters in northern Kunduz province, Afghan officials and witnesses said. Two American service members also died in ground clashes there, U.S. military officials confirmed.

Details of the incidents were murky, with conflicting reports on the number of casualties and no official account of the airstrikes. Some local officials claimed that up to 100 civilians were killed or wounded in a series of airstrikes around Kunduz city.

[NATO and government forces are increasingly responsible for Afghan civilian deaths]

A portion of the strategic provincial capital was briefly overrun by insurgents last month, and Afghan troops assisted by U.S. forces have been trying to clear them from the area.

The confusing and deadly ­drama recalled the tragic events in Kunduz just over a year ago, when the Taliban overran the city and Afghan and NATO forces were trying to beat them back. In the chaos, a U.S. airstrike mistakenly targeted an emergency hospital operated

by Doctors Without Borders, killing 42 patients and staff members.

As of late Thursday, NATO officials had not confirmed or commented on the reported deaths of the civilians, who were said to be members of several families living in a neighborhood near the city. Photographs published on the Internet showed the bodies of small children crumpled on a blanket and being carried in a cart by weeping adults.

Angry relatives of the victims attempted to parade their bodies through the city to the provincial governor’s residence in a protest caravan, but they were stopped by security forces, Amruddin Wali, a member of the provincial council, said in a telephone interview.

A security official in Kunduz said an “operation against the opponents” resulted in the deaths of more than 20 civilians from “various families.” Ghulam Rabbani, another provincial council member, said 36 people were killed. Other officials said homes in various locations were destroyed by the strikes.

[Kabul not spared Taliban strikes]

U.S. military officials in Kabul confirmed that two U.S. service members were killed and two others wounded when they came under insurgent fire.

“Despite today’s tragic event, we are steadfast in our commitment to help our Afghan partners defend their nation,” said Gen. John W. Nicholson, the senior U.S. military commander here, referring to the deaths of the U.S. troops.

Late Thursday afternoon, Brig. Gen. Charles Cleveland, the chief spokesman for Resolute Support, the U.S.-led NATO mission in Afghanistan, issued a statement that referred to airstrikes by “friendly forces” but did not confirm any civilian casualties. It said all information on that matter should come from Afghan officials.

The NATO mission’s mandate is to assist, advise and train Afghan defense forces in their war against insurgents. Almost all foreign combat troops withdrew at the end of 2014, leaving Afghan troops facing an aggressive Taliban militia.

“As part of an Afghan operation, friendly forces received direct fire and airstrikes were conducted to defend themselves,” Cleveland’s statement said. “We take all allegations of civilian casualties very seriously. As this was an Afghan operation, we’ll work with our partners to investigate but refer you to them for additional details in the near term. We’ll provide updates as we have them.”

The senior Afghan Defense Ministry spokesman, Brig. Gen. Dawlat Waziri, said three Afghan special forces members were killed in fighting with the Taliban. He said he had no information on civilian deaths.

A spokesman for the Taliban, Zabiullah Mujahid, said three Taliban fighters were targeted by the Afghan and foreign forces and were then killed in a firefight in which Afghan and American troops also died. He said a large number of civilians also were killed.

Pajhwok Afghan News quoted a farmer in Kunduz named Taza Gul as saying: “I was working on my farm when the bombardment started. On coming home, I saw seven members of my family, including women and children, killed in the raids.”

After the deadly 2015 airstrike in Kunduz, a U.S. military investigation led to the disciplining of 16 military members who were said to have made mistakes leading to the strike. Doctors Without Borders called the attack a war crime.

Read more:

A humanitarian crisis looms in Afghanistan as the number of displaced climbs

The U.S. spent billions building roads in Afghanistan. Now many of them are beyond repair.

From a Nat Geo cover to a mug shot: The sad story of the green-eyed ‘Afghan Girl’

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news