International condemnation mounted on Wednesday after more than 40 migrants were killed in an air strike on a detention centre in Libya that the UN-recognised government blamed on rival strongman Khalifa Haftar.
The UN envoy to the North African nation said the raid was a possible war crime, while the European Union denounced the "horrific" attack.
Bodies were strewn on the floor of the hangar in a Tripoli suburb, mixed with the belongings and blood-soaked clothes of migrants, an AFP photographer said.
Tuesday night's strike left a hole around three metres (10 feet) in diameter at the centre of the hangar, surrounded by debris ripped from the metal structure by the force of the blast.
At least 44 people were killed and more than 130 severely injured, the UN said.
"This attack clearly could constitute a war crime, as it killed by surprise innocent people whose dire conditions forced them to be in that shelter," UN envoy to Libya Ghassan Salame said.
He called for the international community to punish those who ordered, carried out and provided arms for the strike, noting it was the second time the facility has been attacked.
"The absurdity of this ongoing war today has led this odious bloody carnage to its most hideous and most tragic consequences," Salame said in a statement.
An emergency services spokesman Osama Ali told AFP 120 migrants were detained in the hangar which was directly hit by the strike.
Rescuers were searching for survivors under the rubble, while dozens of ambulances rushed to the scene.
The head of the centre, Noureddine al-Grifi, said others had been wounded in a neighbouring hangar that was also damaged by the strike.
The five hangars in Tajoura held around 600 migrants and refugees, he said.
In a statement, the internationally recognised Government of National Accord (GNA) based in Tripoli denounced the attack as a "heinous crime" and blamed it on the "war criminal Khalifa Haftar".
Turkey, which backs the GNA, called for an international probe into what it called a "crime against humanity".
Haftar, who controls much of eastern and southern Libya, in early April launched an offensive to take the capital.
The GNA accused pro-Haftar forces of having carried out a "premeditated" and "precise" attack on the migrant centre.
No-one has so far claimed responsibility, but pro-Haftar media reported Tuesday night a "series of air raids" in Tripoli and Tajoura.
The suburb of Tajoura, which has several military sites belonging to pro-GNA armed groups, is regularly targeted in air raids by Haftar's forces.
"Migrants and refugees must NOT be detained; civilians must NOT be a target; Libya is NOT a safe place of return" for migrants and refugees, the head of the UN refugee agency (UNHCR), Filippo Grandi, said in a tweet.
The European Union called on the UN to launch an investigation.
"Those responsible should be held to account", EU diplomatic chief Federica Mogherini, enlargement commissioner Johannes Hahn and migration commissioner Dimitris Avramopoulos said in a statement.
Migrants 'at risk'
UNHCR spokesperson Charlie Yaxley told AFP in Geneva that the agency had asked to have the centre evacuated a few weeks ago after "a near miss from a similar air strike".
The centre was thought to have been used to store weapons, he added, reiterating "that using civilian infrastructure like that constitutes a violation of international humanitarian law".
Doctors without Borders reacted via Twitter to the "horrifying events", saying "refugees and migrants trapped in Tripoli detention centres must be immediately evacuated".
Wracked by chaos since the 2011 uprising against dictator Moamer Kadhafi, Libya has become a major conduit for migrants seeking to reach Europe.
Italy's Foreign Minister, Enzo Moavero Milanesi, said the strike was "another tragedy that demonstrated the atrocious impact of the war on the civilian population".
France called for "an immediate de-escalation".
Rights groups say migrants face horrifying abuses in Libya, which remains prey to a multitude of militias vying for control of the oil-rich country.
The plight of migrants has worsened since Haftar launched an offensive against Tripoli in early April.
Since then, fighting has killed more than 700 and wounded 4,000, while nearly 100,000 have been displaced, according to UN agencies.
The two rival camps accuse each other of using foreign mercenaries and enjoying military support, especially air, from foreign powers.
The UN's mission in Libya has said around 3,500 migrants and refugees held in detention centres near the combat zone are at risk.