Emergency workers and others recover bodies after an airstrike killed at least 40 people at the Tajoura Detention Center for migrants, east of Tripoli, Libya, July 3, 2019. Getty

Benghazi, Libya -- An airstrike hit a detention center for migrants in the Libyan capital early Wednesday, killing more than 40 people, the United Nations said. The airstrike targeting the detention center in Tripoli's Tajoura neighborhood also wounded 80 migrants, said Malek Merset, a Libyan Health Ministry spokesman. Merset posted photos of migrants being taken in ambulances to hospitals.

Footage circulating online and said to be from inside the migrant detention center showed blood and body parts mixed with rubble and migrants' belongings.

The U.N. refugee agency in Libya condemned the airstrike on the detention center, which houses 616 migrants and refugees.

Get Breaking News Delivered to Your Inbox

The Tripoli-based government blamed the self-styled Libyan National Army, led by Khalifa Haftar, for the airstrike and called for the U.N. support mission in Libya to establish a fact-finding committee to investigate.

A spokesman for Haftar's forces did not immediately answer phone calls and messages seeking comment. Local media reported the LNA had launched airstrikes against a militia camp near the detention center.

International medical aid group Doctors Without Borders condemned the strike as "a horrific tragedy that could have easily been avoided," and chastized European nations for helping Libyan coast guard forces stop the migrants crossing the Mediterranean in boats and returning them to the notorious detention centers in the war-torn country.

"Our teams visited the center earlier yesterday and saw 126 people in the cell that was hit. Those that survived are in absolute fear for their lives," the group, which goes by its French language acronym MSF, said in a statement on Wednesday. "What is needed now is not empty condemnation but the urgent and immediate evacuation from Libya of all refugees and migrants held in detention centers... The reality is that for every person evacuated or resettled this year, more than twice as many have been forcibly returned to Libya by the Libyan Coast Guard with support from the European Union."

Chaos in divided Libya

The LNA launched an offensive against the weak Tripoli-based government in April. Haftar's forces control much of Libya'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 62 miles from the capital. Gharyan had been a key LNA supply route.

Many camps for militias loosely allied with the U.N.-supported government are in Tajoura, east of the city center, and Haftar's forces have targeted such camps with airstrikes in recent weeks. The LNA said Monday it had begun an air campaign on rival forces in Tripoli after it lost control of Gharyan.

His forces include the remnants of late Libyan ruler Muammar Qaddafi's army as well as tribal fighters and ultra-conservative Islamists known as Salafists. They appear more like a regular army than their adversaries, with uniforms and a clear chain of command.

Haftar's forces boast MiG fighter jets supplied by neighboring Egypt, as well as drones, attack helicopters and mine-resistant vehicles. It was not immediately clear what munitions were used in the airstrike early Wednesday.

The fighting for Tripoli has threatened to plunge Libya into another bout of violence on the scale of the 2011 conflict that ousted long-time dictator Qaddafi and led to his death.

Haftar says he is determined to restore stability to the North African country. He is backed by Egypt, the United Arab Emirates and Saudi Arabia while his rivals, mainly Islamists, are supported by Turkey and Qatar.

His campaign against Islamic 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.

His opponents, however, view him as an aspiring autocrat and fear a return to one-man rule.

President Trump was criticized in May for making a phone-call to Haftar, offering what Republican Sen. Lindsey Graham warned could be "perceived in the region as, 'we're picking sides.'"

Graham, a Republican member of the Senate Foreign Affairs Committee, warned that Mr. Trump's call "had an unnerving effect on the ground… if we pick sides, you're going to create the Syrian situation on the ground in Libya. So my advice to the president is push for a political reconciliation in Libya. There is no military solution to Libya. Haftar cannot control the country by military force."

"Hell on Earth"

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 abuses. Most of the migrants were apprehended by European Union-funded and -trained Libyan coast guards while trying to cross the Mediterranean Sea into Europe.

The detention centers 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.

CBS News correspondent Holly Williams visited one of the squalid facilities in the city of Misrata several years ago and witnessed conditions she compared to "hell on Earth."

The U.N. refugee agency has said that more than 3,000 migrants are in danger because they are held in detention centers close to the front lines between 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.