MOSCOW — With Russia's mediation, Armenia and Azerbaijan have agreed to a cease-fire in Nagorno-Karabakh starting at noon Saturday, after two weeks of heavy fighting that marked the worst outbreak of hostilities in the separatist region in a quarter-century.
The countries' foreign ministers said in a statement that the truce is intended to exchange prisoners and recover the dead, adding that specific details will be agreed on later.
The announcement followed 10 hours of talks in Moscow sponsored by Russian Foreign Minister Sergey Lavrov, who read the statement. It stipulated that the cease-fire should pave the way for talks on settling the conflict.
Russia has a security pact with Armenia but has also cultivated warm ties with Azerbaijan.
The latest outburst of fighting between Armenian and Azeri forces began Sept. 27 and left hundreds of people dead, in the biggest escalation of the decades-old conflict over Nagorno-Karabakh since a separatist war there ended in 1994.
The region lies in Azerbaijan but has been under control of ethnic Armenian forces backed by Armenia.
The talks between the foreign ministers of Armenia and Azerbaijan were held on invitation from Russian President Vladimir Putin, who brokered the cease-fire in a series of calls with President Ilham Aliyev of Azerbaijan and Armenia's Prime Minister Nikol Pashinian.
Armenia said it was open to a cease-fire, while Azerbaijan previously made a potential truce conditional on the Armenian forces' withdrawal from Nagorno-Karabakh, arguing that the failure of international efforts to negotiate a political settlement left it no other choice but to resort to force.
The current escalation also marked the first time that Azerbaijan's ally Turkey took a high profile role in the conflict, offering strong political support.
Over the past few years, Turkey has provided Azerbaijan with state-of-the-art weapons, including drones and rocket systems that helped the Azerbaijani military outgun the Nagorno-Karabakh separatist forces in the latest fighting.
Turkey's high profile in the conflict worried Russia, which has a military base in Armenia. The two countries are linked by a security treaty obliging Moscow to offer support to its ally if it comes under aggression.
Download the NBC News app for breaking news and politics
At the same time, Russia has sought to maintain strong economic and political ties with oil-rich Azerbaijan and ward off Turkey's attempt to increase its influence in the South Caucasus, without ruining its delicate relations with Ankara.
Putin and Turkish President Recep Tayyip Erdogan have negotiated a series of deals to coordinate their conflicting interests in Syria and Libya and expanded their economic ties. Last year, NATO member Turkey took delivery of Russian S-400 air defense missiles, a move that angered Washington.