A US aircraft attacked a Medecins Sans Frontieres (MSF) clinic in the Afghan city of Kunduz because of "human error", a US military inquiry said.
The investigation found that the crew of the AC-130 gunship mistook the clinic for a nearby government building that had been seized by Taliban.
At least 30 civilians were killed in the 3 October attack, amid a campaign to retake Kunduz from Taliban forces.
MSF described the attack as a war crime and demanded a thorough investigation.
The medical charity also disputed initial US justifications for the attack, which suggested US forces had struck near the hospital because they had come under fire in the area.
The US military later admitted that the strike was a mistake and launched an investigation.
On Wednesday, the US commander in Afghanistan, Gen John Campbell, said the crew of the AC-130 had mistaken the MSF clinic for a nearby security services building that had been captured by the Taliban.
The aircraft identified the building based on a visual description provided by Afghan forces, he said, and did not refer to coordinates provided by MSF for inclusion on a "no-strike list".
"Tragically this misidentification continued throughout the remainder of the operation, even though there were some contradictory indicators," he said.
"This was a tragic mistake. US forces would never intentionally strike a hospital or other protected facilities."
The gunship fired 211 shells at the MSF compound over 25 minutes, the US military said.
An MSF report released earlier this month said its staff contacted US-led forces several times during the attack, saying they were being bombed.
The general said the US investigation had found that the attack on the hospital was "the direct result of avoidable human error, compounded by process and equipment failures".
He said other factors that contributed to the mistake included:
"Fatigue and high operational tempo" endured by the troops
The loss of electronics communications systems on the aircraft
The nature of the "planning and approvals process for operations" in Kunduz
The absence of a single system to check targets for attack against the no-strike list
The US military said the troops involved in the attack had been suspended, and were awaiting disciplinary action.
MSF has yet to comment on the US military investigation.