Libyan strongman General Khalifa Haftar on Saturday announced a ceasefire in his months-long battle to control the capital Tripoli after calls for a truce from Russia and Turkey.
The North African state has seen an escalation of the turmoil that erupted after a NATO-backed uprising killed dictator Moamer Kadhafi in 2011, with Haftar trying to capture Tripoli from Libya's UN-recognised government.
Russian President Vladimir Putin and his Turkish counterpart Recep Tayyip Erdogan this week called for a truce in Libya starting Sunday from midnight, but Haftar had initially vowed to fight on.
Haftar's forces on Saturday agreed to the ceasefire from midnight on Sunday (2200 GMT), but warned of a "severe" response to any violation by the "opposing camp", a reference to the Tripoli-based Government of National Accord (GNA) led by Fayez al-Sarraj.
Before Haftar's statement, Putin and German Chancellor Angela Merkel met earlier on Saturday in Moscow and called for international efforts to address the crisis in Libya.
Germany and Russia are both acting as mediators in a conflict Berlin has warned could become a "second Syria" and the topic topped the agenda as they met for talks at the Kremlin.
"I am really counting on the opposing sides in Libya ceasing fire, ceasing armed combat... within a few hours," Putin said. "It's important to bring an end to the armed confrontation."
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.
Hafter's forces, who began their offensive on Tripoli in April, did not give any details in their short statement on how the ceasefire would come into effect.
Speaking in Rome after meetings with Italy's premier, Sarraj had earlier welcomed the Turkish-Russian initiative, but said any ceasefire would be conditional on a withdrawal of Haftar's forces.
Western powers and Northern African states have been working to prevent a widening conflict in Libya with the increasingly involvement of international players backing opposing forces in the conflict.
Libya is now divided between the GNA in Tripoli and Haftar's forces in the east and the south and European governments are concerned about Islamist militants and migrant smugglers taking advantage of the chaos.
- Backing Berlin conference -
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.
Putin called the initiative "timely" and a "very good step in the right direction."
The conference must include "countries that have a real interest in promoting a peace settlement" and decisions must be agreed preliminarily with the Libyan sides, with the involvement of Salame, he said.
While Turkey has sent troops to support the UN-backed Tripoli government, Moscow is accused of backing mercenaries supporting Haftar in his fight against the government.
Putin 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."
In Libya, "unfortunately large-scale military action is continuing and terrorist activity is growing," said Putin, who is keen to stress his role as a regional powerbroker.
"All this undermines stability not only in the region itself but has a negative influence on Europe," he added, citing smuggling of drugs and weapons.
He stressed the need to "restart the political process with the final aim of overcoming the split inside the country and forming single state institutions."
- Iran, Ukraine -
The talks that Putin praised as "substantive" also covered other flashpoints in the region, including Iran, with the leaders stressing the need to save the 2015 nuclear deal that the US withdrew from unilaterally in 2018.
Merkel said it was necessary to "keep (the deal) alive" to prevent Iran acquiring nuclear weapons, while Putin said it was necessary for Instex, a barter mechanism to allow Iran to circumvent sanctions on trade backed by major European powers, to "finally start working."
The talks also covered the Syria conflict where a fresh ceasefire brokered by Russia and Turkey is expected to go into effect after midnight in the last major opposition bastion of Idlib.
Putin warned that "large-scale military conflicts" in the Middle East would be a "catastrophe not only for the region, the Middle East, but for the whole world," leading to "new flows of migrants" to Europe and other regions.
This would also cause "huge damage to the global economy," he said.
The leaders also discussed the war with Russia-backed separatists in Ukraine.
Putin in December took part in talks on the Ukraine conflict in Paris in the "Normandy format" hosted by Merkel and French President Emmanuel Macron.
This was his first face-to-face meeting with his recently-installed Ukrainian counterpart Volodymyr Zelensky, relaunching the stalled peace process.