CAIRO — The United Nations on Wednesday condemned an airstrike that killed at least 44 people at a detention center for mostly African migrants near the Libyan capital, describing it as a possible war crime and calling for an independent investigation.

The strike, which also left 130 wounded at the Tajoura detention facility, inflicted the most single-day casualties involving civilians in the nearly three-month struggle over Tripoli between a renegade commander, Khalifa Hifter, and militias aligned with the U.N.-installed, internationally recognized government.

According to U.N. figures, the death toll from Tuesday night’s attack has already more than doubled the number of civilians killed since the conflict began in early April. 

“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,” said Ghassan Salamé, the top U.N. envoy to Libya. U.N. Secretary General António Guterres also expressed his outrage over the “horrendous incident” and called for an independent investigation.

The government has blamed the attack on Hifter’s forces, which have been carrying out airstrikes in their push into Tripoli. No one has claimed responsibility for the strike.

On Wednesday, the U.N. refu­gee agency and the International Organization for Migration demanded that those responsible be held to account. 

“Coordinates of such centers in Tripoli are well known to combatants, who also know those detained at Tajoura are civilians,” the two agencies said in a statement.

The attack is also raising anew calls to end European government policies to stop migrants and asylum seekers from reaching Europe’s shores, such as preventing migrant rescue ships run by humanitarian groups from docking in European ports. The European Union has trained and funded the Libyan coast guard to intercept migrants at sea and take them back to squalid detention centers in Tripoli and other Libyan cities, where they often are treated inhumanely.

Long before the current conflict, migrants have reported being tortured, raped and beaten in detention facilities, locked inside cells, taunted with racist slurs and given only one meager meal a day. Some unofficial detention centers are run by militias involved in human trafficking.

“This attack should be a wake-up call for E.U. states to end their shameful policies outsourcing migration control to Libya in their bid to reduce the number of refugees and migrants arriving on European shores,” said Magdalena Mughrabi, deputy Middle East and North Africa director for Amnesty International, which has also joined the calls for an investigation.

The strike followed numerous appeals in recent months by the United Nations, aid groups and human rights activists to evacuate migrant detention centers in Libya, many of which are on front lines and near military bases. As many as 3,300 migrants and refugees remain in detention facilities in and around Tripoli in inhumane conditions, according to the United Nations.

Many of these groups condemned the attack and reissued calls to evacuate migrants from Libya’s war zones. They also urged European governments to stop supporting the Libyan coast guard’s efforts to return migrants to Libya.

“This is not the first time that migrants and refugees have been caught in the crossfire, with multiple airstrikes on or near detention centers across Tripoli since the conflict started in the city in early April,” said Prince Alfani, Libya medical coordinator for Doctors Without Borders, the medical charity

“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,” he said in a statement. “Today, inaction and complacency has needlessly cost the lives of more vulnerable refugees and migrants.”

Eric Schwartz, president of Refugees International, said in a statement that the E.U.’s “continued support to the Libyan coast guard makes the E.U. and its governments complicit in the horrific fate” faced by migrants in Libya.

The head of the African Union, Moussa Faki Mahamat, called for an independent investigation into the airstrike and said in a statement that those responsible for it should be held accountable. He also urged an immediate cease-fire between the warring sides.

The detention center in the Tajoura enclave east of the capital is located inside a compound that also houses a military camp for forces loyal to the government. Malek Mersek, a spokesman for the government’s emergency medical services, initially said the death toll was 40, but by Wednesday afternoon the number had risen to 44, according to the United Nations.

Photos published on social media showed the destruction to the center as well ambulances at the scene carrying out migrants. Other photos showed migrants lying on beds with their arms bandaged inside a hospital after the airstrike.

Alfani said a Doctors Without Borders team visited the Tajoura facility on Tuesday, before the attack, and found 600 “vulnerable men, women and children.” They included 126 people “in the cell that was hit” during the airstrike, suggesting that the toll may rise further.

“Those that survived are in absolute fear for their lives,” Alfani said.

The Tripoli government said in a statement that dozens were killed or wounded and blamed “the war criminal” Hifter’s warplanes for the attack.

A Hifter spokesman could not be reached immediately for comment. But some of his supporters took to social media, accusing the Tripoli government of not evacuating the migrants and keeping them near military bases to serve as human shields.

According to U.N. investigators and regional security analysts, Hifter has received warplanes, including F-16 fighter jets, from the United Arab Emirates, in violation of a U.N. arms embargo. The Emiratis have built an air base at al-Khadim in northeastern Libya that can handle advanced warplanes and armed drones. The government in Tripoli also has an air force, but it is considered less sophisticated than Hifter’s, analysts said.

Ever since the Arab Spring rebellion ousted Libyan dictator Moammar Gaddafi with help from NATO warplanes in 2011, the oil-producing North African country has been gripped by instability. Militias have sought to grab power and influence, as well as Libya’s vast oil wealth, clashing numerous times in the capital and other cities.

The security vacuum and lawlessness have allowed Libya to become a major hub for human smuggling and a transit point for tens of thousands of migrants trying to reach Europe by boat.

The latest surge of violence was triggered by Hifter when he launched a surprise offensive on Tripoli in early April. Dozens of pro-government militias from Tripoli and other cities united to fight the 75-year-old strongman, a dual U.S.-Libyan citizen and a former general in Gaddafi’s army who lived for years in Northern Virginia. Hifter has aligned himself with a rival government in eastern Libya.

The violence has raised concerns that an Islamic State affiliate, which once ruled the coastal city of Sirte, could take advantage of the chaos and resurrect itself. There is also concern that the conflict could disrupt oil supplies. 

Already, a U.N. peace initiative to reconcile the warring sides and organize elections has been derailed by the offensive.

Hifter vowed to take the capital within two days. Instead, a military stalemate has emerged, with the front line shifting constantly. Last week, Hifter’s self-described Libyan National Army lost a key base in the city of Gharyan to pro-government forces. This week, his army declared it would use heavy airstrikes against its foes.

The conflict — the worst the capital has experienced since 2011 — has also become a proxy war fueled by countries breaking the U.N. arms embargo and sending sophisticated weaponry to both sides. 

In addition to the Emiratis, Hifter is backed by Egypt and Saudi Arabia, as well as France and Russia. The Tripoli government is backed by Turkey, Qatar and other Western powers. The United States is ostensibly on the side of the Tripoli government, but President Trump’s support for Hifter in an April phone call has thrown that into question.