Afghan villagers gather around the bodies of civilians killed in airstrikes on Nov. 3 in Afghanistan’s Kunduz province. (Najim Rahim/AP)

An investigation into a November firefight between Taliban insurgents and joint U.S. and Afghan forces­ has concluded that 33 civilians were killed in the operation, the U.S. military said Thursday.

The battle took place in northern Kunduz province, and two U.S. soldiers and three Afghan troops were also killed. The operation, in Boz Kandahari village, targeted Taliban leaders who the U.S. military said were responsible for deadly incursions in the area, including a brazen assault on the provincial capital in October. The insurgents briefly captured the city’s central neighborhoods in a stunning display of strength.

“The investigation determined, regretfully, that 33 civilians were killed and 27 wounded,” a statement from U.S. forces­ in Afghanistan said. The statement said 26 Taliban fighters, including two leaders, were also killed in the November raid — a claim the villagers dispute.

“To defend themselves and Afghan ­forces, U.S. forces­ returned fire in self-defense at Taliban who were using civilian houses as firing positions,” the statement said, adding that no further action would be taken. No compensation has been paid to the families of the victims, according to Kunduz lawmaker Fatima Aziz.

“We want the U.S. government to pay reparations,” Aziz said when reached by telephone. “For the loss of civilian lives and the destruction of their houses.”

Civilian casualties have reached record highs in Afghanistan, with most of the civilian deaths attributed to battles in rural areas and to suicide and other bomb attacks. More than 2,500 people were reported killed in the first nine months of 2016.

Air operations were responsible for 133 deaths from January to September, the United Nations said, although only a third of them were caused by airstrikes conducted by foreign ­forces.

In Kunduz, American and Afghan troops called in airstrikes after coming under fire in the village, the U.S. investigative report said.

“Upon arrival at the village, friendly forces­ were soon engaged by the Taliban from multiple civilian buildings,” it said. After they began taking casualties, U.S. forces, who were there to advise and assist Afghan troops, called in airstrikes to “suppress” Taliban fighters who were firing on medevac crews.

“No civilians were seen or identified in the course of the battle,” the U.S. military said, adding that the civilians killed or injured “were likely inside the buildings from which the Taliban were fighting.”

But residents of the village dispute that account. One resident, Jamaluddin, said in an interview in November that everyone was asleep when the troops arrived and that the bombing lasted for five hours.

Allah Dad, 70, said he lost 20 members of his extended family, including grandchildren. His account was confirmed by a spokesman for the Kunduz governor.

“I was away that night — only a few [family members] survived,” Dad said.

“No one has come to help us,” he said, adding that he believes U.S. and Afghan troops should be tried for the raid.

But “we leave all matters to God,” he said, “because we can’t do anything.”

In 2015, U.S. aircraft carried out an hours-long air assault on a Kunduz hospital managed by the humanitarian organization Doctors Without Borders, killing 42 people.

The U.S. military, which had been called in to support Afghan forces­ battling Taliban fighters in Kunduz city, said its forces­ were “unaware the aircrew was firing on a medical facility.” Doctors Without Borders has said it is not satisfied solely with a military investigation and has called for an independent commission to continue the probe.

About 10,000 U.S. troops remain in Afghanistan to advise and assist Afghan ­forces. Earlier this month, the United States announced that it would deploy 300 more Marines to Helmand province, a Taliban stronghold where fierce fighting has raged in recent months.

Cunningham reported from Istanbul.