Armenia and Azerbaijan have agreed a temporary ceasefire in the conflict in the disputed Nagorno-Karabakh region.
Russia’s foreign minister announced the agreement just before 03:00 Moscow time (midnight GMT), following 10 hours of talks in the Russian capital.
Sergey Lavrov said the two countries would now begin “substantive” talks.
More than 300 people have died and thousands displaced since the latest violence in the long-running conflict broke out on 27 September.
The hostilities will be halted from midday local time (08:00 GMT) on Saturday, to allow an exchange of prisoners and the recovery of dead bodies.
Nagorno-Karabakh is run by ethnic Armenians although it is officially part of Azerbaijan.
The two former Soviet republics have blamed each other for the latest outbreak of violence – the worst in decades.
Russia has a military base in Armenia and both are members of the Collective Security Treaty Organization (CSTO) alliance.
However, Moscow also has good relations with Azerbaijan.
On Friday the Armenian defence ministry said fighting continued through the day, despite the talks being held in Moscow.
On Thursday, Armenia accused Azerbaijan of deliberately shelling a historic cathedral in Nagorno-Karabakh. Pictures showed serious damage at the Holy Saviour Cathedral in Shusha city (known as Shushi in Armenian).
At the same time, Azerbaijan said that its second-largest city, Ganja, and the region of Goranboy had been shelled by Armenian forces, with at least one civilian killed.
Speaking to the BBC earlier this week, Armenian Prime Minister Nikol Pashinyan warned of a “genocide” in the region, and said it was “Armenia, land of Armenians”.
The clashes have displaced half of Nagorno-Karabakh’s population – about 70,000 people – officials said.
The region’s main city, Stepanakert, has suffered several days of shelling with residents sheltering in basements and much of the city left without power.
Armenia and Azerbaijan went to war over Nagorno-Karabakh in 1988-94, eventually declaring a ceasefire. However, they never reached a settlement in the dispute. (Courtesy BBC)