Air strikes on a hospital in the Afghan city of Kunduz that killed 19 people were "tragic, inexcusable and possibly even criminal", the UN human rights chief says.
High Commissioner Zeid Ra'ad Al Hussein urged a full and transparent investigation into the attack.
US forces were carrying out air strikes at the time.
At least 37 people were seriously injured, 19 of them MSF staff.
"All indications currently point to the bombing being carried out by international Coalition forces," MSF said.
The Nato alliance has admitted its forces may have hit the hospital.
US President Barack Obama expressed his "deepest condolences" for the deaths in a White House statement. But he said he would wait until the US defence department had conducted its own investigation before making a definitive judgement on the incident.
Fire swept through the hospital after the air strikes.
The scale of the destruction was clear at first light.
UN High Commissioner Zeid earlier said: "International and Afghan military planners have an obligation to respect and protect civilians at all times, and medical facilities and personnel are the object of a special protection.
"These obligations apply no matter whose air force is involved, and irrespective of the location."
MSF said that all parties to the conflict, including Kabul and Washington, had been told the precise GPS co-ordinates of the hospital on many occasions, including on 29 September.
In a statement, the charity said all indications pointed to the bombing being carried out by international coalition forces.
It reported that from 02:08 until 03:15 local time, the hospital was hit by a series of aerial bombing raids at approximately 15-minute intervals.
The main central hospital building - housing the intensive care unit, emergency rooms, and physiotherapy ward - was repeatedly hit during each aerial raid while surrounding buildings were left mostly untouched, it added.
"The bombs hit and then we heard the plane circle round," said Heman Nagarathnam, MSF head of programmes in northern Afghanistan.
"There was a pause, and then more bombs hit. This happened again and again. When I made it out from the office, the main hospital building was engulfed in flames. Those people that could had moved quickly to the building's two bunkers to seek safety."
MSF president Meinie Nicolai described the incident as "abhorrent and a grave violation of international humanitarian law".
She added: "We demand total transparency from coalition forces. We cannot accept that this horrific loss of life will simply be dismissed as 'collateral damage'."
A spokesman for US forces in Afghanistan, Col Brian Tribus, said: "US forces conducted an air strike in Kunduz city at 02:15 (local time)... against individuals threatening the force.
"The strike may have resulted in collateral damage to a nearby medical facility."
In a statement, US Defence Secretary Ash Carter said: "While we are still trying to determine exactly what happened, I want to extend my thoughts and prayers to everyone affected.
"A full investigation into the tragic incident is under way in co-ordination with the Afghan government."
Gen John Campbell, the commander of US forces in Afghanistan, later confirmed the air strike was "in the vicinity" of the MSF facility but was targeting "insurgents who were directly firing upon US service members".
Afghan President Ashraf Ghani said the US-led Nato force had offered condolences over the incident.
Taliban denial
The Afghan interior ministry said a group of 10 to 15 militants were hiding in the hospital.
"They are killed, all of the terrorists were killed, but we also lost doctors," ministry spokesman Sediq Sediqi said.
The Taliban denied that any of its fighters were there.
A Taliban statement described the air strikes which hit the hospital as "deliberate", and carried out by "the barbaric American forces".
MSF says that staff and patients critically injured in the attack on the hospital have been transferred to a hospital in Pul-e Khumri, two hours' drive away.
There has been intense fighting in Kunduz since Taliban fighters swept into the northern city on Monday.