Libya’s two rival factions signed a “permanent” ceasefire agreement Friday after five days of talks at the United Nations, which hailed the move as a moment that will go down in history. “Today is a good day for the Libyan people,” said Stephanie Williams, the UN’s envoy to the troubled North African country, where a UN-recognised government in Tripoli has been battling a rival administration based in the east and dominated by military strongman Khalifa Haftar. “At 11:15 am (0915 GMT) this morning here at the UN headquarters in Geneva, the two Libyan delegations… signed a complete, countrywide and permanent ceasefire agreement with immediate effect,” she said. Williams said the parties agreed that “all military units and armed groups on the front lines shall return to their camps”. This would be “accompanied by the departure of all mercenaries and foreign fighters from all Libyan territory, land, air and sea within a maximum period of three months from today.” Libya has been wracked by conflict for nearly a decade, since the overthrow and killing of dictator Moamer Kadhafi in a NATO-backed uprising. Since then, it has been dominated by armed groups, riven by local conflicts and divided between the two bitterly opposed adminstrations. But hopes for a solution have risen after the two warring factions in August separately announced they would cease hostilities. However, both sides continue to accuse each other of supporting “terrorist” groups. Libya’s former colonial power Italy hailed the agreement, as did the European Union. “The agreement of a permanent ceasefire is key for the resumption of a political dialogue,” EU foreign policy spokesman Peter Sano, adding, “It’s very important, as well, to see this accord put into effect.” Erdogan questions ceasefire viability But President Recep Tayyip Erdogan of Turkey, which backs the GNA with military support, questioned the viability of the ceasefire. “Today’s ceasefire agreement was actually not made at the highest level, it was at a lower level. Time will tell whether it will last,” Erdogan said. “So it seems to me that it lacks credibility.” The UN-sponsored talks took place in the format of a 5+5 Joint Military Commission: five delegates from each side attend. The breakthrough was announced Friday at a signing ceremony that was streamed live on the Facebook page of the UN’s Libya mission, or UNSMIL. “The 5+5 Joint Military Commission talks in Geneva today culminate in a historic achievement as Libyan teams reach a permanent ceasefire agreement across Libya,” it said. “This achievement is an important turning point towards peace and stability in Libya.” Delegates, wearing masks, stood before signing the agreement documents at the UN Palais des Nations in Geneva. Williams said it was “a moment that will go down in history”. Mohamed Eljarh, a Libya expert and co-founder of Libya Outlook for Research and Consulting, hailed the agreement as an “important milestone”. “Particularly important are the trust-building measures including reopening of roads, airports, oil terminals and exchange of prisoners” among other details, he tweeted. “Although the signing of the ceasefire agreement today is an important milestone, devil is in the details & the devil is in the implementation,” Eljarh wrote. “There are internal/external players who will see a ceasefire agreement & subsequent political deal as a threat to their influence.” Since Kadhafi’s ouster in 2011, rival power centres and a myriad of militias have vied for control of Libya. Tripoli is held by the internationally recognised Government of National Accord, while a parliament based in the eastern city of Tobruk is backed by Haftar’s forces.