Libya’s rival authorities have announced an immediate ceasefire.
The Tripoli-based and internationally recognised Government of National Accord (GNA) published a statement that also calls for elections in March next year.
The truce was also agreed by an ally of Gen Khalifa Haftar, who controls large parts of the east and south of Libya.
Libya has been riven by violence since Col Muammar Gaddafi was deposed by Nato-backed forces in 2011.
The oil-rich nation is a key transit point for migrants heading to Europe from Africa.
The conflict there has caused a split within Nato.
Last month, France temporarily pulled out of the Nato security operation Sea Guardian, accusing Turkey of violating an arms embargo against Libya.
It came weeks after Turkish ships allegedly targeted a French warship in the Mediterranean – something Ankara strongly denies.
What did the rivals say?
GNA head Fayez al-Sarraj “issued instructions to all military forces to immediately cease fire and all combat operations in all Libyan territories”, it said on its Facebook page.
There has been no direct comment from Gen Haftar but Aguila Saleh, speaker of the eastern-based parliament, which supports him, also announced a ceasefire.
Both the UN and Egypt’s President Abdul Fattah al-Sisi, who also backs Gen Haftar, have welcomed the agreement.
What’s the background?
Both sides in Libya’s civil war have international support. Turkey, Italy and Qatar are among those siding with the GNA in Tripoli, while Russia, Egypt and the United Arab Emirates back Gen Haftar.
France is also thought to back Gen Haftar, although leaders in Paris have repeatedly denied this.
A UN arms embargo is in place to stop men and materiel flowing into the country, but it has had little effect.
Turkey agreed a military co-operation deal with the GNA in 2019, and deployed troops to the country in January.
In June, GNA forces finally regained full control of Tripoli thanks to greater help from Turkey. Gen Haftar has withdrawn his forces from the city’s suburbs.
A UN report leaked in May said that hundreds of mercenaries from the Russian Wagner Group – run by Yevgeny Prigozhin, a close associate of President Vladimir Putin – were operating in Libya in support of Gen Haftar.
There are reports the Wagner Group is evacuating from the country, although these have not been confirmed.
A calculated truce?
By Rana Jawad, BBC North Africa Correspondent
There’s been hardly any military combat in Libya since June, but what appears to be a coordinated ceasefire declaration by Libya’s rival political blocs sets the stage for a new phase in the stalemate.
It raises some hope for a population that has born the brunt of the country’s multiple conflicts for nearly a decade.
Ceasefires have been unilaterally declared, asked for, and arguably forced several times over the years, and they have rarely been indicative of a long-lasting truce or progress.
The declared ceasefire comes amidst a continued oil-export blockade, tensions between rival forces each backed by powerful regional allies, and the recent diplomatic pressure by the US and EU member-states.
The prospect of yet another war would be costly for everyone, and leave neither side closer to consolidating a grip on the whole country.
Everyone involved knows this and – for now -appear to have convinced themselves, and each other, of a plan B.