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.