In Abu Grein, on Libya’s frontline, the militiamen’s scars read like a rollcall of the wars that have roiled the country since the fall of Muammar Gaddafi in 2011. One of the fighters, a truck driver named Muhammad, removes his cap to reveal a balding pate etched with shrapnel gashes. “From Da’ish,” he says, referring to a 2016 battle he fought against Islamic State in the Libyan city of Sirte.

Now, he says, yet another foe has captured Sirte: rebel militias under the command of a 76-year-old aspiring strongman named Khalifa Haftar. Last Sunday, these militias attacked Muhammad and his men, killing 11 of them, ignoring a shaky truce in a long-running war that started last April with a blitz on the Libyan capital by Haftar’s forces.

Far from the quick victory Haftar promised, it has been a drawn-out slog that has left more than 2,000 dead

A former army general under Gaddafi who defected in the 1980s and became a CIA asset, Haftar launched his invasion of Tripoli after years of war in eastern Libya, where he built up power. In attacking the weak, internationally recognised Government of National Accord (GNA) in the capital, he claimed he was going to unify the country and put an end to militias. To be sure, the GNA has been unpopular due to its administrative ineptitude and deference to corrupt militias. But a promising UN-brokered process was underway to replace that government and address the militia menace before Haftar’s offensive scuttled it.

An abiding quest for power has fuelled Haftar’s rise. When I met him in 2014, he told me even then of his plans to invade Tripoli, promising to eliminate Islamists of all shades through imprisonment, exile or death. In pursuing his ambitions, he has deployed brutal tactics. In 2015, his allied militias in Benghazi admitted to me that they had carried out summary executions and stoked tribal divisions. One of his lieutenants faces a standing arrest warrant for war crimes; Haftar responded to this by promoting him.

The war he launched in Tripoli has caused misgivings among his supporters. Far from the quick victory he promised, it has been a drawn-out slog that has left more than 2,000 dead, including hundreds of civilians, and displaced hundreds of thousands. Most alarmingly, the conflict has drawn in outside powers who have sustained it with hi-tech weaponry– all in contravention of a UN arms embargo.

On Haftar’s side is a bloc of authoritarian and anti-Islamist Arab states: the United Arab Emirates, Egypt, Jordan and Saudi Arabia. The Emirates’ role has been especially destructive – its drones and fixed-wing aircraft have conducted hundreds of strikes, according to the United Nations, causing scores of civilian deaths. French support is also key. Driven by a misplaced zeal for Haftar’s virtues as a counterterrorist and stabiliser, Paris has been sending him clandestine military aid for several years.

Added to this are the hundreds of Russian mercenaries who arrived at the Tripoli front last September, helping Haftar break the stalemate. While Moscow is not firmly wedded to the general, its strategy seems to be to egg him on and then reel him in, in order to shape a settlement to its liking. But that has not gone entirely to plan; last month, he walked out of a ceasefire meeting convened by Moscow.

On the other side is Turkey, whose Islamist-led government has long been at odds with the Emirati-led bloc. Not long after Haftar’s attack, Turkey dispatched armed drones of its own to the GNA and in recent weeks it has sent thousands of Syrian mercenaries, along with Turkish intelligence personnel, air defence systems and artillery. But this came at a cost: Turkey’s president, Recep Tayyip Erdoğan, is providing this new round of aid only after signing an accord with the GNA that enables Turkey to extend its exclusive economic zone in the eastern Mediterranean.

A much-hyped international summit hosted by the German government took place earlier this month, but it failed to formalise a ceasefire – Haftar effectively spurned the talks. And indeed, in recent days, emboldened by the increased flow of Emirati arms, he has effectively restarted the war, bombing Tripoli’s airport and civilian areas and blockading oil ports, which has caused production to drop dramatically and worsened the misery of Libyans. It’s part of a creeping escalation that could embroil the capital in even more bloodshed.

Trump's foreign policy is cynical and self-interested. His 'peace plan' is no exception | Michael H Fuchs Read more

Averting this catastrophe demands a greater role from the one power that might be able to rein in Haftar. “Haftar will not accept a ceasefire unless America twists his ear,” a GNA commander told me. That may well be right. Washington needs to jettison its tacit and sometimes explicit support for Haftar, epitomised in a phone call in April 2019 by Donald Trump to the general endorsing his attack on Tripoli.

While that enthusiasm has somewhat cooled because of Haftar’s alliance with the Russians, there’s still more that the US can do, especially in areas where Washington has unique leverage. These include halting Haftar’s illegal effort to unilaterally sell oil on the global market, getting the Emirates to stop arming his forces, and backing a UN security council ceasefire resolution that would include strong provisions against embargo violators and human rights abusers.

In the meantime, it’s Libyans who suffer: from the constant fear of shelling or air strikes, 16-hour blackouts and the sense that their fates are being decided from abroad. “Libya’s like a cake,” the mayor of Yefren, a town in Libya’s western mountains, told me last month. “Everybody wants a bite.”

• Frederic Wehrey is a senior fellow at the Carnegie Endowment for International Peace and author of The Burning Shores: Inside the Battle for the New Libya