The airstrike was likely to raise further concerns about the European Union's policy of partnering with Libyan militias to prevent migrants from crossing the Mediterranean, which often leaves them at the mercy of brutal traffickers or stranded in squalid detention centers near the front lines.

An airstrike hit a detention center for migrants in the Libyan capital early Wednesday, killing at least 40 people and wounding dozens, officials in the country's U.N.-supported government said.

Emergency workers and other recover bodies after an airstrike killed nearly 40 at Tajoura Detention Center, east of Tripoli on early July 3, 2019.

It could also lead to greater Western pressure on Khalifa Hifter, a Libyan general whose forces launched an offensive on Tripoli in April. The Tripoli-based government blamed his self-styled Libyan National Army for the airstrike and called for the U.N. support mission in Libya to establish a fact-finding committee to investigate.

A spokesman for Hifter'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.

The airstrike targeting the detention center in Tripoli's Tajoura neighborhood also wounded 35 migrants, according to the Interior Ministry in Tripoli. Health Ministry spokesman Malek Merset posted photos of migrants being taken in ambulances to hospitals. He had earlier said that 80 were wounded.

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 airstrike hit a workshop housing weapons and vehicles and an adjacent hangar where around 150 migrants were being held, mostly Sudanese and Moroccans, according to two migrants who spoke to The Associated Press on condition of anonymity for fear of reprisal.

The migrants said three or four survived unharmed and about 20 were wounded. They said the remainder were killed, indicating the final death toll could be much higher.

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

The LNA launched an offensive against the weak Tripoli-based government in April. Hifter'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 100 kilometers (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 Hifter'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 Gadhafi'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.

Hifter'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.