Main points of Nagorno-Karabakh 'peace deal'
Here are the main points of the deal, which came after Azerbaijan managed to retake significant territory it had lost to Armenian separatists in a 1990s war over the region.
The deal was signed by Russian President Vladimir Putin, Azerbaijani President Ilham Aliyev and Armenian Prime Minister Nikol Pashinyan.
A complete ceasefire and cessation of all hostilities was agreed from midnight Moscow time on Tuesday.
The two sides will maintain positions in the territories they currently hold, a significant gain for Azerbaijan after it reclaimed some 15 to 20 percent of lost territory including the key town of Shusha.
A Russian force of 1,960 military personnel with small arms, 90 armoured personnel carriers and 380 units of automobile and special equipment will deploy to the region to act as peacekeepers along the frontline and secure the Lachin corridor that links the region to Armenian territory.
The peacekeeping mission will last for five years and be automatically renewable for five-year periods as long as no party withdraws from the deal.
Return of territory
Armenia will return control to Azerbaijan of the Aghdam district by November 20, the Kalbajar district by November 15 and the Lachin district by December 1.
The five-kilometre wide Lachin corridor will connect Nagorno-Karabakh with Armenia, bypassing its previous route through Shusha.
Prisoner exchange, refugees return
Internally displaced persons and refugees will return to the region and adjacent districts formerly under Armenian control.
The two sides will exchange prisoners of war and other detained persons, as well as bodies.
Read also: Turkey hails Azerbaijan 'gains' after Karabakh deal
Armenia will guarantee transport through the country from Azerbaijan to its Nakhchivan Autonomous Republic exclave on the border with Turkey, and the construction of transport communications will be provided.
The agreement makes no mention of the future status of the Armenian-populated areas of Nagorno-Karabakh or of the format of future negotiations to settle the conflict.