The U.S. military said it conducted an air strike on Saturday near a hospital run by Medecins Sans Frontieres (MSF) in the northern city of Kunduz that killed 19 staff and patients, including three children, the medical aid group said.
The U.S. military said it had launched a strike during battles with the Taliban that "may have resulted in collateral damage to a nearby medical facility" but said details were still not clear and promised an investigation.
U.N. Human Rights chief Zeid Ra'ad Al Hussein led a chorus of condemnation, without saying who carried out the strike, and that an assault on a hospital could amount to a war crime.
Click through to see more from the scene:
The medical charity said its staff phoned military officials at NATO in Kabul and Washington during the morning attack, but bombs continued to rain down for nearly an hour.
"All indications currently point to the bombing being carried out by international Coalition forces," MSF said, demanding "a full and transparent account".
MSF said it had given the location of the hospital to both Afghan and U.S. forces several times in the past few months, most recently this week, to avoid being caught in crossfire.
At least three children, four adult patients and 12 MSF personnel died in the blasts, the aid group said. At least 37 people were wounded and many are still missing, it said.
At the charred remains of aid group's facility, one wall of a building had collapsed, scattering fragments of glass and wooden door frames, and three rooms were still ablaze, Saad Mukhtar, director of public health in Kunduz, said.
"Thick black smoke could be seen rising from some of the rooms," he said after a visit to the hospital. "The fighting is still going on, so we had to leave."
Afghan government forces backed by U.S. air power have fought to drive the Taliban out of the northern provincial capital since the militants seized it six days ago, in the biggest victory of their near 14-year insurgency.
Resident Khodaidad told Reuters the Taliban had been using the hospital buildings for cover during fighting on Friday.
"I could hear sounds of heavy gunfire, explosions and airplanes throughout the night," he said. "There were several huge explosions and it sounded like the roof was falling on me."
Zeid called for a "swift, full and transparent" investigation into the bombardment, which, if established as deliberate in court, he said, could be a war crime.
"This event is utterly tragic, inexcusable, and possibly even criminal," he said.
U.S. forces supporting Afghan government troops launched an air strike at 2.15 a.m. (2145 GMT), which "may have resulted in collateral damage to a nearby medical facility", spokesman, Colonel Brian Tribus, said in a statement.
U.S. Defense Secretary Ash Carter said Washington had launched an investigation into the incident in coordination with the Afghan government.
A U.S. official, speaking on condition of anonymity, said a U.S. military AC-130 gunship had been operating in the area, firing at Taliban targets to provide what was essentially defensive, close-air support to forces on the ground.
But it was still unclear whether those rounds from the AC-130 struck the hospital, the official said, noting that coalition forces have dispatched a one-star general from Kabul to investigate the incident.
The hospital had treated almost 400 patients in the 150-bed hospital since fighting broke out on Monday, most for gunshot wounds. So many patients have flooded in that the hospital had to put them in offices and on mattresses on the floor.
Afghan President Ashraf Ghani's spokesman said last week there would be no air strikes inside the city because of the risk of mass civilian casualties.
Ghani's predecessor, Hamid Karzai, fell out with his backers in Washington in part over the number of civilians killed by bombs in the nearly 14-year-old war, America's longest military conflict.
The International Committee of the Red Cross said it was "deeply shocked" by the incident.
For more on Doctors Without Borders, watch the video below: