An air strike hit a detention centre for migrants early on Wednesday in the Libyan capital, killing at least 40 people, a health official in the country's UN-supported government said. The air strike on the detention centre in Tripoli's Tajoura neighbourhood also wounded 80 migrants, Malek Merset, a spokesman for the health ministry, said. Mr Merset posted photos of migrants who were being taken in ambulances to hospitals. Footage circulating online and said to be from inside the migrant detention centre showed blood and body parts mixed with rubble and migrants' belongings. The UN refugee agency in Libya condemned the air strike on the detention centre, which houses 616 migrants and refugees. The Tripoli-based government blamed the Libyan National Army, led by Field Marshal Khalifa Haftar, for the air strike and called for the UN support mission in Libya to establish a fact-finding committee to investigate. An LNA official denied that his force had hit the detention centre in a statement to Reuters, saying that militias allied to Tripoli had shelled it after a precision air strike by the LNA on a military camp. A spokesman for Field Marshal Haftar's forces did not answer phone calls and messages seeking comment. Local media reported LNA had launched air strikes against a militia camp near the detention centre. The LNA launched an offensive against the weak Tripoli-based government in April. Field Marshal Haftar's forces control much of the country's east and south but were dealt a significant blow last week when militias allied with the Tripoli government reclaimed the strategic town of Gharyan, about 100 kilometres from the capital. Gharyan had been a key supply route for the LNA forces. Many camps for militias loosely allied with the UN-supported government are in Tajoura, east of the city centre, and Haftar's forces have attacked such camps with air strikes in the past weeks. The LNA said on Monday it had begun an air campaign on rival forces in Tripoli after it lost control of Gharyan. The fighting for Tripoli has threatened to plunge Libya into another bout of violence on the scale of the 2011 conflict that ousted longtime dictator Muammar Qaddafi and led to his death. Field Marshal Haftar says he is determined to restore stability to the North African country. He is backed by Egypt, the UAE and Saudi Arabia while his rivals, mainly extremists, in Tripoli are supported by Turkey and Qatar. His campaign against militants across Libya since 2014 won him growing international support from world leaders who say they are concerned that Libya has turned into a haven for armed groups, and a major conduit for migrants bound for Europe. At least 6,000 migrants from Eritrea, Ethiopia, Somalia, Sudan and other nations are locked in dozens of detention facilities in Libya that are run by militias accused of torture and other human rights abuses. Most of the migrants were apprehended by EU-funded and trained Libyan coast guards while trying to cross the Mediterranean Sea into Europe. The detention centres have limited food and other supplies for the migrants, who made often-arduous journeys at the mercy of abusive traffickers who hold them for ransom money from families back home. The UN refugee agency has said that more than 3,000 migrants are in danger because they are held in detention centres close to the front lines between Field Marshal Haftar's forces and the militias allied with the Tripoli government. Libya became a major crossing point for migrants to Europe after the 2011 ouster and killing of Qaddafi, when the North African nation was thrown into chaos, armed militias proliferated and central authority fell apart.