Armenia and Azerbaijan agreed on Saturday to a ceasefire and to begin "substantive talks" over the breakaway region of Nagorno-Karabakh after nearly two weeks of fierce clashes.
Bitter fighting in the South Caucasian region has claimed hundreds of lives, forced thousands to flee, and stirred fears of a full-blown war that could suck in regional powers Turkey and Russia.
Speaking after 11 hours of Moscow-mediated talks between Armenia and Azerbaijan, Russian Foreign Minister Sergei Lavrov said the warring sides had agreed to a ceasefire from "12 hours 00 minutes on October 10 on humanitarian grounds."
It was not immediately clear whether the pause in fighting would come into effect at noon in Moscow or the local time in Karabakh.
During the ceasefire — mediated by the International Committee of the Red Cross — the parties will exchange bodies and prisoners, Lavrov said, reading from a statement.
"Concrete parameters of the ceasefire will be agreed separately," the statement added.
Russia's top diplomat also said that Armenia and Azerbaijan agreed to start negotiating a peaceful solution to the territorial dispute.
"Azerbaijan and Armenia begin substantive negotiations with the purpose of achieving a peaceful settlement as soon as possible," Lavrov told reporters, adding that such talks would be mediated by France, Russia and the US.
Renewed fighting over Karabakh — an ethnic Armenian region of Azerbaijan that broke from Baku's control in a devastating war in the early 1990s — has claimed some 400 lives and forced thousands of people from their homes.
The heavy clashes erupted late last month, with both sides blaming the other for the biggest outbreak in violence since a 1994 ceasefire left the status of Karabakh in limbo.
Azerbaijani President Ilham Aliyev, who has repeatedly vowed to use his military to retake the breakaway province, said earlier that the talks represented a historic opportunity for Armenia.
"We are giving Armenia a chance to settle the conflict peacefully," he said. "This is their last chance."
Armenia's Prime Minister Nikol Pashinyan said his country was "ready for the resumption of the peace process" led by international brokers.
Heavy clashes continued into Friday, Armenian and Azerbaijani defence officials said, with further civilian deaths reported, even after Russian President Vladimir Putin announced the Moscow meeting and appealed for a ceasefire on humanitarian grounds.
Shelling started again in Stepanakert, the provincial capital of Karabakh, where an AFP journalist heard several explosions and saw the remains of a rocket in a crater next to a cemetery for dead soldiers.
A spokesman for the Armenian defence ministry told reporters on Friday that fighting continued despite the negotiations in Moscow.
The region's declaration of independence has not been recognised by any country — even Armenia — and the international community regards it as part of Azerbaijan.
The return of fighting has stoked fears in the West of a full-blown war embroiling Turkey, which strongly backs Azerbaijan, and Russia, which has a military treaty with Armenia.
Discussions in Moscow, Azerbaijan and Armenia's first high-level talks since the fighting broke out took place after Putin called for an end to hostilities and invited the two nations' foreign ministers to the city.
Putin's announcement came shortly after mediators from France, Russia and the U.S. — known as the "Minsk Group" — launched efforts in Geneva to end the latest flare-up.
The group has sought a solution to the Karabakh conflict for decades but has failed to stop sporadic outbreaks of fighting.
Negotiations in Geneva went ahead without Armenia, which refused to participate while the fighting was ongoing, and there were no public statements following the closed-door talks.
Mounting civilian toll
Since the conflict restarted both sides have accused the other of shelling areas populated by civilians and thousands of people have been displaced by the clashes.
Stepanakert is dotted with damaged buildings and unexploded ordnance following days of shelling. AFP journalists have also witnessed destruction in villages in Azerbaijan near the front line.
Armenia accused Azerbaijan on Thursday of hitting the Ghazanchetsots (Holy Saviour) Cathedral leaving a gaping hole in its roof and several journalists injured.
Armenia's rights ombudsman Artak Beglaryan told AFP this week that the fighting has displaced around half of Karabakh's 140,000 residents and forced some 90% of its women and children from their homes.
Dozens of civilians have been confirmed killed and the Armenian side has acknowledged 350 military deaths, while Azerbaijan has not admitted to any fatalities among its troops.