Libya’s rival authorities have announced a direct ceasefire.
The Tripoli-based and internationally recognized Government of National Accord (GNA) published a statement also calling for elections in March next year.
The ceasefire was also agreed by an ally of Gen Khalifa Haftar, who controls large parts of eastern and southern Libya.
Libya has been plagued by violence since Col Muammar Gaddafi was ousted in 2011 by NATO-backed forces.
The oil-rich nation is an important transit point for migrants traveling to Africa.
The conflict there has caused a split within NATO.
Last month, France temporarily withdrew from the NATO security operation Sea Guardian, accusing Turkey of violating an arms embargo against Libya.
It came weeks after Turkish ships apparently targeted a French warship in the Mediterranean – which Ankara strongly denies.
What did the rivals say?
GNA chief Fayez al-Sarraj “instructed all military forces to stop 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, spokesman for the parliament in the east, which supports him, also announced a ceasefire.
Both the UN and Egyptian President Abdul Fattah al-Sisi, who also supports Gen Haftar, have welcomed the agreement.
What is the background?
Both sides in Libya’s civil war have received international support. Turkey, Italy and Qatar are among those sitting with the GNA in Tripoli, while Russia, Egypt and the United Arab Emirates have Gen Haftar back.
France is also thought to support Gen Haftar, although leaders in Paris have denied this several times.
A UN arms embargo is in place to stream men and material into the country, but it has little effect.
Turkey agreed to a military alliance with the GNA in 2019, and introduced troops to the country in January.
In June, GNA troops finally regained full control of Tripoli through greater assistance from Turkey. Gen Haftar has withdrawn his troops from the suburbs of the city.
A UN report leaked in May said hundreds of mercenaries from the Russian Wagner Group – led by Yevgeny Prigozhin, a close associate of President Vladimir Putin – were working in Libya in support of Gen Haftar.
There are reports that the Wagner Group is evacuating from the country, although these have not been confirmed.
A calculated ceasefire?
By Rana Jawad, BBC North Africa correspondent
There has been little military action in Libya since June, but what appears to be a coordinated ceasefire by Libya’s rival political blocs sets the stage for a new phase of disruption.
It raises some hope for a population that has spawned nearly a thousand of the country’s multiple conflicts.
Ceasefire was declared unilaterally, forcing and arguing forced several times over the years, and they have rarely pointed to a prolonged ceasefire as progress.
The declared ceasefire comes amid a continuing blockade of oil exports, tensions between rival forces each backed by powerful regional allies, and the recent diplomatic pressure by US and EU member states.
The prospect of yet another war would be costly for everyone, and leave none of the sides closer to consolidating a grip on the whole country.
Everyone involved knows this and – for now – some seem to be convincing themselves, and each other, of a Plan B.