Libya's two warring factions have signed a "permanent" ceasefire agreement after five days of talks at the United Nations, which hailed the deal as a historic moment following years of turmoil and bloodshed.
"Today is a good day for the Libyan people," said Stephanie Williams, the UN's acting 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 commander Khalifa Haftar.
"The two Libyan delegations... signed a complete, country-wide and permanent ceasefire agreement with immediate effect," she told journalists afterwards.
Ms Williams said the parties agreed that "all military units and armed groups on the front lines shall return to their camps," while "all mercenaries and foreign fighters" must leave within three months.
Analysts have warned that further measures are needed to prevent spoilers undermining the deal in a country wracked by conflict for nearly a decade, since the overthrow and killing of dictator Muammar Gaddafi in a Nato-backed uprising in 2011.
Since then, it has been dominated by armed groups, riven by local conflicts and divided between the two bitterly opposed administrations.
Tripoli is held by the internationally recognised Government of National Accord, while a parliament based in the eastern city of Tobruk is backed by Gen Haftar's forces.
But hopes for a solution rose after the two sides separately announced in August that they would cease hostilities.
Ahmed Abu Shahma, who headed the GNA delegation in Geneva, urged Libyans to come together and rebuild a united, stable country.
"We have had enough suffering, enough divisions, enough bloodshed," he said at the signing ceremony.