Afghan forces who said they were under Taliban fire asked for the US air strike that killed 22 people at a hospital in Kunduz, the US commander in Afghanistan claims.
The US military had previously reported that its own troops were under fire and had called in the strike, which was carried out by an AC-130 gunship.
"We have now learned that on October 3, Afghan forces advised that they were taking fire from enemy positions and asked for air support from US air forces," General John Campbell told reporters on Monday (local time).
"An air strike was then called to eliminate the Taliban threat and several civilians were accidentally struck," he said.
Campbell said the request was made to US special forces who were advising the Afghans, but it was unclear how close to the action they were.
The general, who commands US forces in Afghanistan, declined to comment on the rules under which the US forces were operating.
But he promised a thorough and transparent investigation and pledged "if errors were committed we will acknowledge them."
"We will hold those responsible accountable and take steps to ensure mistakes are not repeated," he added.
Doctors Without Borders, a charity which goes by its French initials MSF, has called for an independent investigation "under the clear presumption that a war crime has been committed."
The charity said that despite frantic calls to military officials in Kabul and Washington, the main building housing the intensive care unit and emergency rooms was "repeatedly, very precisely" hit almost every 15 minutes for more than an hour.
Campbell said he should have a preliminary report from the US officer investigating the incident, Brigadier General Richard Kim, "in the next couple of days."