The battle between rival militias for the Libyan capital has killed more than 1,000 people since it began in April, the UN said Tuesday, a grim milestone in a stalemated conflict partly fuelled by regional powers.

Forces loyal to Khalifa Haftar, a veteran army officer, opened an offensive on Tripoli in early April, advancing on the city’s southern outskirts and clashing with an array of militias loosely affiliated with the UN-recognized government.

Haftar’s self-styled Libyan National Army is the largest and best organized of the country’s many militias, and enjoys the support of Egypt, the United Arab Emirates and Russia. But it has faced stiff resistance from fighters aligned with the UN-recognized government, which is aided by Turkey and Qatar.

The World Health Organization said in a brief statement that 1,048 people have been killed since the offensive began, including 106 civilians. It says 5,558 have been wounded, including 289 civilians.

Migrants stopped from entering Europe are often detained in Libya, but an airstrike on a detention centre near Tripoli on Tuesday has renewed safety concerns. We discuss the dangers for people in detention, and ask whether there’s a political will to address them. 18:21

The battle lines have changed little since the offensive began, with both sides dug in and shelling one another in the southern reaches of the capital. Militias aligned with the government recently recaptured Gharyan, a town some 100 kilometres west of the city that is on a major supply route.

Deadly detention centre strike

The fighting has emptied entire neighbourhoods of civilians. Thousands of African migrants captured by Libyan forces funded and trained by the European Union are trapped in detention centres near the front lines. An airstrike on one facility last week killed more than 50 people, mainly migrants held in a hangar that collapsed on top of them.

Libya slid into chaos after the 2011 NATO-backed uprising that toppled and killed long-ruling dictator Moammar Gadhafi. Armed groups have proliferated, and the country has emerged as a major transit point for migrants fleeing war and poverty for a better life in Europe.

Haftar returned to the country after Gadhafi’s fall, having spent about two decades in exile in the U.S.

Haftar’s supporters say he is the only leader who can end militia rule, reunite the country and keep it from being a safe haven for terrorists. They point to his success in defeating Islamic militants and other rival factions in eastern Libya over the past few years. Egypt and the U.A.E. see him as a bulwark against the Muslim Brotherhood and other Islamists.

France and Italy, meanwhile, have competing economic and oil industry interests inside Libya.

But his critics see him as an aspiring strongman, and his offensive appears to have at least temporarily united western Libya’s fractious militias in opposition to a return to one-man rule.

Many experts predicted at the start of the offensive that it was unlikely to succeed , noting widespread resistance to Haftar in the west and fractures within his own forces, which include Gadhafi-era army units, ultraconservative Islamists and tribal fighters.