A suspected US airstrike on a hospital in the Afghan city of Kunduz that left at least 19 people dead continued for more than 30 minutes after Washington was informed of the situation, the charity says.

The charity group, known as Medecins Sans Frontieres (MSF), said in a statement it was shocked by the attack.

It said the trauma centre in Kunduz was "hit several times during sustained bombing and was very badly damaged".

"The bombing continued for more than 30 minutes after American and Afghan military officials in Kabul and Washington were first informed," MSF said on Twitter.

"All parties to the conflict, including in Kabul and Washington, were clearly informed of the precise location (GPS coordinates) of the MSF facilities."

Loading

The head of US-led forces in Afghanistan offered condolences to the country's president over the incident.

The president's office had earlier said Army General John Campbell apologised to president Ashraf Ghani, but it later retracted the statement.

A spokeswoman for the international coalition could not immediately confirm that General Campbell phoned Mr Ghani but said she was checking.

NATO said a US airstrike "may have" hit a hospital run by the medical charity in Kunduz.

"US forces conducted an airstrike in Kunduz city at 2:15am (local time) ... against individuals threatening the force," a NATO statement said.

"The strike may have resulted in collateral damage to a nearby medical facility. This incident is under investigation."

MSF said many staff were still unaccounted for and tweeted a picture showing the hospital ablaze after the bombing.

At the time of the bombing, 105 patients and their caretakers and more than 80 Doctors Without Borders international and national staff were present in the hospital, the charity said.

The charity had stated on Friday it was treating 59 children at the facility. It tweeted a picture saying surgery was still going ahead, despite the bombing.

Doctors Without Borders said surgery was continuing, despite the bombing attack on its hospital in Kunduz. ( Twitter: Medecins Sans Frontieres UK )

A wall of the hospital's main building collapsed in the attack, scattering fragments of glass and wooden door frames, while three rooms were on fire, said Saad Mukhtar, director of public health in Kunduz.

"Thick black smoke could be seen rising from some of the rooms," Mr Mukhtar said after a visit to the hospital.

"The fighting is still going on, so we had to leave."

The group said it gave the coordinates of the hospital to Afghan and US forces several times to avoid being caught in crossfire.

A local resident said he was desperately trying to contact six of his friends, all doctors and nurses at Doctors Without Border, but their mobile phones were unreachable.

"I don't have any news from them and they may have been killed," he said.

He said many residents with injured relatives at the facility were too afraid to step out of their homes to check on them amid erratic fire fights between troops and Taliban snipers lurking in the city.

Hospital bombing comes amid renewed fighting

Fighting has raged around the northern provincial capital for the last six days after Taliban militants captured the city in their biggest victory of a nearly 14-year insurgency.

Loading

Taliban fighters in Kunduz were still holding out against Afghan troops on Friday, a day after government forces recaptured most of the city.

The US military has unleashed several airstrikes this week in support of government forces in the city.

Taliban spokesman Zabihullah Mujahid said none of its fighters was a patient in the hospital at the time of the attack.

Civilian and military casualties caused by NATO forces have been one of the most contentious issues in the lengthy campaign against Taliban insurgents, provoking harsh public and government criticism.

In a statement, the Taliban accused "barbaric American forces" of deliberately carrying out Saturday's strike.

US-led NATO forces ended their combat mission in Afghanistan last December, though a 13,000-strong residual force remains for training and counter-terrorism operations.

There has been an escalation in airstrikes by NATO forces in recent months despite the drawdown.

Doctors Without Borders said since fighting broke out around Kunduz earlier this week, it had treated 394 injured people in the trauma centre.

AFP/Reuters