Both sides in Libya's conflict agreed to a ceasefire that started early Sunday following weeks of international diplomacy and calls for a truce by power-brokers Russia and Turkey.
The oil-rich North African country has been wracked by bloody turmoil since a NATO-backed uprising killed long-time dictator Moamer Kadhafi in 2011.
Since April last year, the Tripoli-based, UN-recognised Government of National Accord (GNA) has been under attack from forces loyal to eastern-based strongman Khalifa Haftar, which days ago advanced to take the strategic coastal city of Sirte.
Late Saturday Haftar forces announced a ceasefire starting at the stroke of midnight in line with a joint call by Turkish President Recep Tayyip Erdogan and his Russian counterpart Vladimir Putin.
Early Sunday the head of the GNA, Fayez al-Sarraj, also announced an agreement to the ceasefire, saying it had taken effect at the start of Sunday.
Sarraj stressed the GNA's "legitimate right ... to respond to any attack or aggression" that may come from the other side - just as Haftar forces had warned of a "severe" response to any violation by the "opposing camp".
Artillery fire could be heard shortly after midnight from the centre of the capital, before quiet settled over the southern Tripoli suburb where pro-GNA forces have been resisting Haftar's offensive launched April 4, 2019.
Fears of a 'second Syria'
Erdogan and Putin had called for a ceasefire at a meeting on Wednesday in Istanbul, and Turkey on Saturday asked Russia to convince Haftar, who had initially vowed to fight on, to respect it.
Ankara deployed military support to the GNA in January, while Russia has been accused of supporting pro-Haftar forces, which are also backed by the United Arab Emirates and Egypt.
Europe and North Africa have launched a diplomatic offensive to try to prevent Libya, with the increased involvement of international players in its conflict, from turning into a "second Syria".
European governments are concerned that Islamist militants and migrant smugglers, already highly active in Libya, will take further advantage of the chaos.
On Saturday Putin and German Chancellor Angela Merkel met in Moscow and called for international efforts to address the crisis in Libya.
Merkel, making her first visit to Russia since 2018, said she hoped "the Turkish-Russian efforts will be successful," calling a ceasefire a first step in a peace process.
Putin and Merkel both backed a Libya peace conference in Berlin being organised by UN special envoy to Libya, Ghassan Salame, which could be held in the coming weeks.
Both Russia and Turkey have emerged as key players in Libya.
While Turkey has sent defence equipment and troops to support the UN-backed Tripoli government, Moscow is accused of backing mercenaries supporting Haftar.
Putin on Saturday reiterated Moscow's denial of this, saying: "if there are Russians there, they do not represent the interests of the Russian state and do not receive money from it."