A US military investigation confirmed that dozens of Afghan civilians were killed in a special forces operation near the northern city of Kunduz last year, but found troops had acted in self-defence and decided no action would be taken against them.
The report, published on Thursday, said 33 civilians were killed and 27 wounded last November when a US and Afghan special forces unit returned fire against Taliban fighters in the village of Boz, near Kunduz, and called in air support.
"The investigation concluded that US forces acted in self-defense, in accordance with the Law of Armed Conflict, and in accordance with all applicable regulations and policy," the US military in Afghanistan said in a statement.
The raid, involving both US and Afghan special forces, took place during operations to push back Taliban fighters from the vicinity of Kunduz, the strategic city they had come close to overrunning in October.
The unit came under heavy fire from Taliban fighters using civilian houses as firing positions and suffered several casualties before calling in air support, the military added.
"Regardless of the circumstances, I deeply regret the loss of innocent lives," Gen. John Nicholson, commander of US Forces in Afghanistan said in the statement, adding that "all possible measures" would be taken to protect Afghan civilians.
While the investigation concluded that more than 30 civilians had been killed, it said aircraft providing support had used "the minimum amount of force required to neutralise the various threats from the civilian buildings".
It also found that no civilians were seen or identified, and the dead and wounded were probably inside the buildings used by Taliban fighters. Some of the casualties may also have been caused by a Taliban ammunition dump that exploded.
Two US soldiers and three Afghan army commandos were killed and another four Americans and 11 Afghan commandos wounded, with around 26 Taliban fighters also killed.
Last year, the US military disciplined 16 service members over a separate incident in Kunduz in 2015, when a US air strike killed 42 people in a hospital run by medical aid group Medecins Sans Frontieres.
Related Story