The US commander of international forces in Afghanistan has said an air strike on a hospital in the northern city of Kunduz was a mistake.
Gen John Campbell said that the US would never intentionally target a protected medical facility.
At least 22 people were killed in the attack as government forces battled to retake the city from the Taliban.
Gen Campbell also said that the US must consider boosting its military presence in Afghanistan after 2016.
He said that such a measure would be necessary if the Taliban upsurge was to be repelled and Afghanistan's military kept up to fighting strength.
The "tenuous security situation" might require a re-think of any reduction, the general said.
Medical charity MSF has called for an independent international inquiry into the Kunduz attack.
It has launched a Twitter campaign in support of its demand.
The charity said that statements from the Afghan government implied that the hospital had been deliberately targeted - and amounted to an admission of a war crime.
In testimony before the Senate Armed Services Committee in Washington, Gen Campbell said: "To be clear, the decision to provide aerial fires was a US decision, made within the US chain of command."
Gen Campbell said that the proposed air strike underwent "rigorous" US military procedures beforehand which were intended to prevent such mistakes.
He said the attack was requested by Afghan forces who were fighting Taliban fighters in Kunduz. He said they were in communication with American special operations troops at the scene.
Those US forces in turn were in contact with the AC-130 gunship that fired on the hospital, he said.
"The hospital was mistakenly struck," he said. "We would never intentionally target a protected medical facility."
The general said that he was not in a position to provide more details about what happened, including who may have failed to follow military guidelines to avert attacks on hospitals.
He said that such details must await the outcome of numerous inquiries.
The White House on Tuesday announced that Department of Justice would investigate the air strike.
Similar probes are being conducted by the Pentagon, Nato and an American-Afghan team.
MSF President Joanne Liu has dismissed the American explanation for the attack. "Until proven otherwise, we are working on the presumption of a war crime," she said in a statement.
She said that her charity had alerted the Afghan and coalition military leadership about the attack, which continued for at least another 30 minutes.
"The hospital was well known and the GPS co-ordinates had been regularly shared with coalition and Afghan military and civilian officials, as recently as Tuesday 29 September," she said.
"This attack cannot be brushed aside as a mere mistake or an inevitable consequence of war."
- BBC