GENEVA/TRIPOLI  - Libya's warring factions signed a permanent ceasefire agreement on Friday, but any lasting end to years of chaos and bloodshed will require wider agreement among myriad armed groups and the outside powers that support them.

Acting U.N. Libya envoy Stephanie Williams said the ceasefire would start immediately and all foreign fighters must quit Libya within three months. 

As a first commercial passenger flight in more than a year crossed front lines from Tripoli to the eastern city of Benghazi on Friday, Williams noted Libya's "fraught" recent history, one of numerous broken truces and failed political solutions.

"But we shouldn't let the cynics win," she said, hailing both sides for their "courage" in agreeing a ceasefire and saying they deserved international support.

Friday's agreement was reached after the internationally recognised Government of National Accord (GNA) in June beat back Khalifa Haftar's eastern-based Libyan National Army (LNA) from its 14-month assault on the capital.

Since then, frontlines have stabilised near the central coastal city of Sirte and the LNA has ended its eight-month blockade of Libyan oil output, which was strangling state finances on both sides.

However, Turkey, the main backer of the GNA, immediately voiced scepticism that the ceasefire would hold, with President Tayyip Erdogan saying "it does not seem too achievable".

Turkey, along with the LNA's main foreign backers Russia, the United Arab Emirates and Egypt, has funnelled weapons and fighters into Libya despite a U.N. arms embargo which they all publicly backed.

There was caution inside Libya too. "We all want to end the war and destruction. But personally I don't trust those in power," said Kamal al-Mazoughi, 53, a businessman sitting in a Tripoli cafe.

"If there is no force or mechanism to apply this on the ground... this deal will only be ink on paper," said Ahmed Ali, 47, in Benghazi.

 

'POSTURING AND POSITIONING'

Key details on implementing the ceasefire, including monitoring the departure of foreign fighters and merging armed groups, have been left to subcommittees in future talks.

Both sides have deployed thousands of foreign fighters in Libya, including Syrians, Sudanese, Chadians and European mercenaries brought in by Russia's Wagner group. Since June, they have entrenched along the Sirte frontlines with new weapons and defensive positions.

Meanwhile, political talks scheduled in Tunisia early next month, with a view to holding national elections eventually, will need to reach agreement on historically elusive issues and overcome widespread mistrust.

"There is still no clear sign that Libyan belligerents are looking at this as anything other than a period of posturing and positioning," said Tarek Megerisi, a policy fellow at the European Council on Foreign Relations.

Libya has enjoyed no political stability since the 2011 NATO-backed uprising against Muammar Gaddafi, and has been split since 2014 between east and west.

Haftar's assault on Tripoli last year was launched as U.N. Secretary General Antonio Guterres had arrived in Tripoli to prepare for peace talks.

As that assault collapsed this summer, thanks to Turkish backing for the GNA, Egypt threatened to intervene directly, raising the spectre of a bloody regional escalation.

Libya's energy facilities, the biggest prize for both sides, were on the front line as mercenaries marched into ports and oilfields.

However, the United Nations is also pushing an economic track to seek agreement between the major factions on the future management of Libya's wealth and its sovereign institutions.

"What prevails among (Libyan factions) is a desire to re-start the economy," said Jalel Harchaoui, an analyst working on Libya. "That alignment is frail and temporary."

Guterres said he hoped to appoint the current U.N. Middle East envoy, the Bulgarian Nickolay Mladenov, as the new Libya envoy to replace Ghassan Salame, who quit in March due to stress.

 

(Reporting by Stephanie Nebehay in Geneva, Reuters Libya newsroom, Angus McDowall, and by Michelle Nichols at the United Nations; Editing by William Maclean and Kevin Liffey) ((angus.mcdowall@thomsonreuters.com; Reuters Messaging: angus.mcdowall.thomsonreuters.com@reuters.net))