The top commander of US and coalition forces has said Afghan troops requested an airstrike which hit a hospital in Kunduz, killing 22 people.

General John Campbell, speaking at the Pentagon, said he was correcting an initial statement which said the airstrike had been employed to defend US forces who had come under fire from the Taliban.

He said the Afghan military advised US special operations forces on the ground that they needed air support, and that the civilians were "accidentally struck".

"An airstrike was then called to eliminate the Taliban threat and several civilians were accidentally struck," he said.

"This is different from the initial reports which indicated that the US forces were threatened and the airstrike was called on their behalf.

"If errors were committed, we will acknowledge them, we will hold those responsible accountable and we will take steps to ensure mistakes are not repeated.

"I want to offer my deepest condolences to those innocent civilians who were harmed and killed on Saturday."

Gen Campbell did not clarify whether the clinic was targeted in error, or whether other mistakes may have been made by US forces.

He said Taliban forces were remaining in the city, putting civilians in harm's way.

Nine aid workers were among the 22 people killed when the airstrike hit the hospital.

Medecins San Frontieres (MSF) said it had withdrawn from Kunduz after the hospital was badly damaged.

It said the hospital was hit despite the fact it had informed US, NATO and Afghan forces of its location a number of times to avoid being hit in the crossfire.

The US military has launched an investigation into the tragedy, with President Barack Obama also offering his "deepest condolences" to those killed and wounded.

Click for more from SkyNews.