The US military has said its investigation into a clash with the Taliban in Afghanistan has shown that 33 civilians died in the raid during which American troops fired on Afghan homes.
The probe followed claims that civilians died in November when air strikes were called in to support Afghan and US troops under fire in the village of Buz-e Kandahari, Kunduz province, which targeted two senior Taliban commanders.
The two Taliban figures, responsible for violence in Kunduz the previous month, were killed in the operation.
A US military statement said the investigation "determined, regretfully, that 33 civilians were killed and 27 wounded" as troops responded to fire from "Taliban who were using civilian houses as firing positions".
After the raid, Kunduz residents carried more than a dozen bodies, including children and family members of the Taliban fighters, to a local governor's office in a show of rage.
In the statement, General John Nicholson, commander of US forces in Afghanistan, said: "Regardless of the circumstances, I deeply regret the loss of innocent lives.
"On this occasion the Taliban chose to hide amongst civilians and then attacked Afghan and US forces.
"I wish to assure President (Ashraf) Ghani and the people of Afghanistan that we will take all possible measures to protect Afghan civilians. We will continue to assist the Afghan security forces in their efforts to defend their country."
The Taliban briefly overran the city of Kunduz, the provincial capital with the same name, in October 2015, in a show of strength by the insurgents that also highlighted the troubles facing local Afghan forces, 15 years after the US-led invasion of the country.
The Taliban captured and held parts of Kunduz a year earlier as well, before the city was fully liberated weeks later with the help of US air strikes.
In the 2015 operation, a US Air Force special operations AC-130 gunship attacked a Kunduz hospital run by the medical charity Doctors Without Borders, killing 42 people.
Sixteen US military personnel, including a two-star general, were disciplined for what American officials described as mistakes that led to the strike.
Doctors Without Borders has called the attack a war crime and demanded an independent investigation.
After the firefight in November, Mr Ghani criticised the Taliban for using women and children as "a shield" during the raid in Buz-e Kandahari. He also announced a local investigation had been started.
The US military statement added that its investigation "concluded that US forces acted in self-defence" in the Afghan-American raid.
"As an indication of the ferocity of the fire faced by friendly forces from the Taliban-occupied houses, two US soldiers and three Afghan army commandos were killed. In addition, four US soldiers and 11 commandos were wounded."
The raid killed 26 Taliban fighters and wounded around 26 other insurgents, the US military said.
The investigation concluded that US air assets used the minimum force required and the civilians who were wounded or killed were probably inside the buildings from which the Taliban were firing.
The US military said a Taliban ammunition cache was struck and exploded, which destroyed multiple civilian buildings and may also have killed civilians.
"It has been determined that no further action will be taken because US forces acted in self-defence and followed all applicable law and policy," the statement concluded.
Nato's combat operations ended in Afghanistan at the end of 2014, a move that put Afghan forces in charge of the country's security. Since then, Afghan troops have suffered heavy casualties battling the Taliban, who have tried to expand their footprint across much of the country.