It comes after six weeks of fighting between Azerbaijan and Armenian separatists in the disputed region
Armenia, Azerbaijan and Russia have signed an agreement to end military conflict over the disputed enclave of Nagorno-Karabakh.
The peace deal takes effect on Tuesday from 01:00 local time (21:00 GMT Monday).
It comes after six weeks of fighting between Azerbaijan and ethnic Armenians.
The region is internationally recognised as Azerbaijani, but has been run by ethnic Armenians since 1994.
In that year, a truce was signed after fighting but not a peace deal.
A number of ceasefire agreements have been brokered since fighting broke out again in September, but all of them have failed.
The Armenians have steadily lost territory and over the weekend Azeri forces took over the region’s second largest town Shusha, known as Shushi in Armenian.
Azerbaijan has also admitted to mistakenly shooting down a Russian military helicopter over Armenia, killing two crew members and injuring a third.
Under the new deal, Azerbaijan will hold onto areas of Nagorno-Karabakh that it has taken during the conflict. Armenia has also agreed to withdraw from several other adjacent areas over the next few weeks.
During a televised online address, Russia’s President Vladimir Putin said that 1,960 Russian peacekeepers would be deployed to patrol frontlines.
Turkey will also take part in the peacekeeping process, according to Azeri President Ilham Aliyev, who joined President Putin during the address.
President Aliyev said the agreement was of “historic importance,” and amounted to a “capitulation” by Armenia.
In a post on social media, Armenian Prime Minister Nikol Pashinyan said the agreement was “incredibly painful both for me and both for our people”.
He added that his decision was based on “deep analyses of the combat situation and in discussion with best experts of the field”.
“This is not a victory but there is not defeat until you consider yourself defeated,” the prime minister said.
It is unclear exactly how many have died. Nagorno-Karabakh’s authorities say nearly 1,200 of its defence forces have died in the fighting, and civilians have also been killed or injured.
Both sides deny targeting civilians but accuse the other of doing so.
Azerbaijan has not released its military casualty figures but has said more than 80 civilians have been killed in the fighting – including 21 in a missile strike on the town of Barda last month.
Russian President Vladimir Putin said last month that almost 5,000 people had been killed in the fighting.
What’s the geopolitical context in South Caucasus?
Russia has a military base in Armenia, and the two countries are members of the Moscow-led Collective Security Treaty Organization.
The treaty envisages Russia’s military support if Armenia is attacked – but it does not include Nagorno-Karabakh or the other Azerbaijani regions around it seized by Armenian forces.
At the same time, Moscow also has strong ties to Azerbaijan, which is being openly backed by Turkey, a Nato member. Russia has been selling weapons to both Armenia and Azerbaijan.