Libya's warring rival administrations announced in separate statements Friday that they would cease all hostilities and organise nationwide elections soon, an understanding swiftly welcomed by the United Nations.
The statements were signed by Fayez al-Sarraj, head of the UN-recognised Government of National Accord (GNA) based in the capital Tripoli, and Aguila Saleh, speaker of the eastern-based parliament backed by military strongman Khalifa Haftar.
The two have been at war virtually since the formation of Sarraj's government in December 2015.
The UN's top official to Libya, Stephanie Williams, called for "all parties to rise to this historic occasion and shoulder their full responsiblities before the Libyan people."
Sarraj called for the holding of "presidential and parliamentary elections next March", and for the "end of all combat operations".
On the other side, Saleh also backed elections -- though he did not specify a date -- and called on "all parties" to observe "an immediate ceasefire and the cessation of all fighting."
It is the first deal between rival Libyan factions since a UN-sponsored accord in Morocco in December 2015, when dialogue led to agreement on a unity government.
Egyptian President Abdel Fattah al-Sisi said he supported the ceasefire declarations.
"I welcome statements by Libya's presidential council and the House of Representatives calling for a ceasefire and halting military operations in all Libyan territory," Sisi said in a tweet.
Sisi, whose government has been a major supporter of the eastern-based administration dominated by Haftar, said the twin announcements were an "important step" on the path to restoring stability.
Libya has been in chaos since a Western-backed uprising toppled and killed longtime dictator Moamer Kadhafi in 2011.
Haftar launched an offensive in April 2019 to seize Tripoli from the GNA.
But the move prompted heightened intervention by Turkey and its regional ally Qatar in support of the Tripoli based administration.
After 14 months of fierce fighting, Turkish-backed pro-GNA forces expelled Haftar's troops from much of western Libya and pushed them eastwards to Sirte, a gateway to Libya's rich oil fields and export terminals.
As well as Egypt, Haftar has had the backing of the United Arab Emirates, Saudi Arabia and Russia, prompting repeated calls from the United Nations for outside powers to stop meddling.
German Foreign Minister Heiko Maas, on a surprise visit to Tripoli this week, had warned that Libya faced a "deceptive calm" since fighting stalled around Sirte.
The central Mediterranean coastal city -- a symbolic site as the hometown of Kadhafi -- is the gateway to Libya's eastern oil fields and export terminals, and to the key Al-Jufra airbase to the south.
In reaction to the rival parties' declarations, German Foreign Ministry spokeswoman Maria Adebahr said Friday "this could be an important step towards establishing peace."
Italy also welcomed the announcement. "These developments constitute an important and courageous step towards the stabilisation of the Libyan crisis," the foreign affairs ministry said in a statement.
Sarraj said a ceasefire would allow the creation of "demilitarised zones" in Sirte and the Jufra region, currently under the control of pro-Haftar forces.
Saleh did not mention the demilitarisation of Sirte and Jufra, but proposed the installation of a new government in Sirte.
But while the agreement was widely welcomed, analyst Jalel Harchaoui, research fellow at The Hague-based Clingendael Institute, said there was a long road ahead before peace.
"The question is, is this announcement fully achievable? In all likelihood, implementation will be difficult," said Harchaoui, noting the multiple regional forces who could act as spoilers of a deal.