Last week's ceasefire agreement between two powerful and bitter rivals - the hard-headed maverick General Khalifa Haftar and Fayez al-Sarraj - has once again raised the hopes of long-tormented Libyans.
Haftar is commander of the Libyan National Army (LNA) and al-Sarraj is head of the United Nations-backed Government of National Accord (GNA) based in the capital Tripoli.
The ceasefire, if adhered to, will prevent the much-feared clash for total control of Libya between the GNA from the west and the LNA from the east. Such a clash would plunge the country into full-scale civil war and even greater chaos than it has suffered over the past six years.
The hope is that it will also have laid the basis for finally ending the conflict that has gripped Libya since its people rose up and toppled the dictator Muammar Gaddafi in 2011.
The Paris accord, which al-Sarraj and Haftar publicly pledged support for in the presence of French President Emmanuel Macron and the newly appointed UN envoy for Libya, Ghassan Salamé, included an agreement to hold elections as soon as possible.
General Haftar, who has been something of a law unto himself and a spoiler of previous peace efforts, has been notching up one military victory after another in the east and the centre of the country. He has captured the major oil ports of Sidra and Ra's Lanuf and last month evidently liberated the eastern city of Benghazi from Islamist and other rebel militias.
General Haftar is too powerful to be left out of Libya's recognised government
Now he has formally committed himself to the subordination of the military to democratic, civilian authority in a new post-election and more representative government, pledging to end military action against all but terrorists. The agreement has received mixed reviews. One of the most common criticisms has been that it has merely conferred legitimacy on Haftar, whom many regard as a self-serving renegade.
But the French defend the deal by saying that it simply acknowledges the reality that Haftar was too powerful to be left out of the recognised GNA government. Indeed, his absence from the December 2015 Skhirat agreement, which created that government, had been identified as one of its main weaknesses.
Under that agreement the UN installed the GNA and al-Sarraj in Tripoli last year. The GNA was meant to unite the dual governments that had been ruling Libya for the past few years - one in Tripoli and another, the House of Representatives government in Tobruk, of which Haftar was part. But Tobruk and Haftar never came on board and so the stand-off continued.
Though Macron hailed last week's agreement as advancing the cause of peace, fighting will surely continue among militias, including Islamists, who were not part of the deal. Holding elections in such conditions would almost certainly aggravate rather than mitigate the violence, sources close to the mediation acknowledge - as happened after the 2014 elections when the losers resorted to violence.
So a wider political settlement is necessary for meaningful and peaceful elections. That would require most of the militias to lay down arms too, and it's now up to Salamé to draw those militias who want peace, into the process.
Holding elections under current conditions would aggravate rather than mitigate the violence
One of Macron's main aims, sources say, was to give Salamé a fighting chance as he took over what many diplomats regard as the poison chalice of finding peace in Libya. Diplomats say over the past year, peace efforts by Salamé's predecessor Martin Kobler had largely lost direction. Significantly, these efforts had neglected the security track which was then attended to in the run-up to the Paris accord.
Macron's mediation initiative sidelined the African Union (AU), despite considerable consultation by the AU's High-Level Commission headed by Congolese President Denis Sassou Nguesso. The French president evidently also irked Italy - the former colonial power that took the lead in seeking a peace deal, and which bears the brunt of the chaos in Libya as the first port of call for the hundreds of thousands of refugees fleeing the country.
But diplomatic sources said Macron felt the chaos in Libya simply couldn't go on and so anyone who could, had to try to stop it. They do not add that perhaps Macron felt that France might have a special responsibility because it was former French president Nicolas Sarkozy who led the international community's charge to topple Gaddafi, which plunged Libya into further chaos.
France had leverage in Libya because it fully backed the al-Sarraj government in Tripoli but had also backed Haftar in his successful fight against extremists. However it didn't support his ambition to take charge of the country.
Macron's mediation sidelined the AU, despite considerable consultation by the High-Level Commission
Haftar is the key to the success of the Paris agreement. Will he stick to it? The deal commits him to waging war only on terrorists, but even those involved in brokering the deal admit that Haftar has a wide definition of terrorism - including all who oppose him.
But the deal brokers are also confident that Egypt and the United Arab Emirates - which fully back Haftar including with military support - will put pressure on him to implement the Paris deal.
Some of the main militias outside the deal are also concerned that Haftar has ambitions to be another Abdel Fattah el-Sisi, emulating his main backer. Haftar told French media after the Paris deal that he intended hanging up his uniform and putting on a civilian suit to run for president in the next elections. What he might do as a civilian president is anyone's guess.
So countless hurdles remain. Nonetheless the peace brokers are convinced that the fact that Haftar came to Paris and pledged support for the agreement with al-Sarraj is at least a big step in the right direction. They pin their hopes on their sense that both Libyans and the rest of the world have had enough and desperately want peace.
The price of the conflict, measured in terrorism, other violence, trafficking and immigration, has simply become too high.
Peter Fabricius, ISS Consultant