Armenia and Azerbaijan have agreed a temporary ceasefire in the conflict in the disputed Nagorno-Karabakh region.
Russian Foreign Minister Sergei Lavrov announced the agreement just before 03:00 local time (01:00 BST), following 10 hours of talks in Moscow.
The two countries will now begin “substantive” talks, he said.
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 (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.
What’s the latest on the ground?
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).Under fire in Nagorno-Karabakh
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”.
- Nagorno-Karabakh conflict grows as big cities hit
- Nagorno-Karabakh conflict in pictures
- What are Armenia and Azerbaijan fighting over?
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.
Key Photo: Reuters Thousands have been displaced so far in the conflict