The international humanitarian group Médecins Sans Frontières said Sunday it had withdrawn from the northern Afghan city of Kunduz after a deadly airstrike destroyed its hospital and killed 22 people.

The humanitarian crisis in the city, which briefly fell to the Taliban last week before the government launched a counteroffensive, has grown increasingly dire, with shops shuttered because of ongoing fighting and roads made impassable by mines planted by insurgents.

The medical group, also known by its English name Doctors Without Borders, blames the 22 deaths on a U.S. airstrike. Afghan officials said helicopter gunships were returning fire from Taliban fighters who were hiding in the hospital.

But the organization is calling the bombing a war crime, with the executive director of its Canadian division telling CBC News that staff contacted both the U.S. and Afghan forces throughout, but the airstrike continued for another 35 minutes.

"Such attacks against medical facilities are grave breaches of humanitarian law," Stephen Cornish told CBC News on Sunday. "At the time of this attack our surgery team were operating on a patient on the operating table who [then] died on that operating table.

"We can't possibly imagine or understand how such an event could have occurred."

Staff with Médecins Sans Frontières (Doctors Without Borders) resumed surgery on Saturday even though most of its hospital in Kunduz was destroyed in the airstrike overnight. (@MSF/Twitter)

The U.S. military ordered an investigation into the bombing of the hospital on Saturday, but Cornish said that Doctors Without Borders wants to see an independent probe conducted into the air attack.

The organization announced Sunday that three more injured hospital patients had died, bringing the total to 10 in addition to the 12 dead hospital staffers.

The facility has since transferred all of its patients to other health-care centres, the closest of which are hours away, Cornish said. The organization has no plans to reopen in Kunduz until the security of its staff and patients are guaranteed, he said.

Even then, it could take a long time to rebuild. The bombing decimated both the operating theatre and the intensive care unit, Cornish said.

Taliban had seized Kunduz

Cornish also told CBC News that allegations of gunfire coming from inside the hospital are untrue.

"The first bomb was actually the first signal that something was untowards," he said. "There were no strange noises or anything different in the compound so it's absolutely absurd to hear such false claims."

AP video footage of the burned out compound in the east of Kunduz city shows automatic weapons, including rifles and at least one machine-gun, on windowsills.

Stephen Cornish, executive director of MSF Canada, discusses Saturday's incident in Afghanistan 2:50

President Ashraf Ghani has said a joint investigation is underway with U.S. forces. U.S. President Barack Obama said that he expected a full accounting of the circumstances surrounding the bombing.

The Taliban seized Kunduz last Monday but have since withdrawn from much of the city in the face of a government counterattack. Sporadic battles continue as troops attempt to clear remaining pockets of militants.

The Taliban's brief seizure of Kunduz marked the insurgent group's biggest foray into a major urban area since the 2001 U.S.-led invasion ended their rule.

Afghan forces have been struggling to combat the Taliban since the U.S. and NATO shifted to a support and training role at the end of last year, officially ending their combat mission in the war-torn country.

Militants blocked and mined roads as soon as they entered Kunduz to prevent people from leaving and to thwart the government's assault.

Death toll growing since Taliban gained control

The deputy head of the Afghan National Disaster Management Authority, Aslam Sayas, said he was aware of the growing needs of people trapped inside the city. "We are waiting for the security situation to improve to give us an opportunity to reach those needy people," he said.

Saad Mukhar, the Kunduz provincial public health director, estimates that more than 70 people have been killed and more than 500 wounded in the city since the fighting began.

"I'm afraid that if this situation continues, we will not be able to help our patients because right now we are facing a serious, drastic shortage of medicine," he said.