A U.S. military investigation found that a November airstrike targeting the Taliban in Northern Afghanistan’s Kunduz province killed 33 civilians, U.S. forces said on Thursday.

It said in a statement that 27 civilians were wounded in the village of Boz in Kunduz city.

It said that the airstrike was called as U.S. and Afghan forces “returned fire in self-defence at Taliban who were using civilian houses as firing positions.

“Regardless of the circumstances, I deeply regret the loss of innocent lives,” General John Nicholson, the top commander of U.S. forces and the NATO mission said.

According to the statement, the operation was launched to capture Taliban commanders responsible for the violence in Kunduz in October when militants captured parts of the city.

“The loss of civilian life is unacceptable and undermines efforts towards building peace and stability in Afghanistan,” Tadamichi Yamamoto, Head of the UN Assistance Mission in Afghanistan (UNAMA) said.

The U.S. statement said that civilians were killed and wounded because the Taliban were using their houses as launchpads.

The statement said that a Taliban weapons cache was struck “which also destroyed multiple civilian buildings and may also have killed civilians."