Ethnic Armenian soldiers walk in a trench at their position near Nagorno-Karabakh's boundary, April 8, 2016. REUTERS/Staff/File Photo/File Photo

Armenia, Azerbaijan and Russia signed an agreement last night that stopped the war in Nagorno Karabakh. The ceasefire took effect at midnight.

In Nagorno Karabakh itself, the line of separation is becoming the current situation on the battlefield, while Armenia has pledged to return the municipalities (7 of them) surrounding Nagorno Karabakh to Azerbaijan. Thus, the Armenians retain the capital of Nagorno Karabakh, Stepanakert, which was dangerously close to Azerbaijani forces, but they are left without the part of Nagorno Karabakh occupied by the Azerbaijani army.

Agdam will be handed over by November 20, Kelbajar by November 15, and Lachin by December 1, with the exception of the 5-kilometer corridor (Stepanakert-Lachin), as the only highway connecting Nagorno-Karabakh with Armenia passes through Lachin.

That corridor will be guarded by about 2,000 Russian troops over the next five years, and the presence of Russian forces is automatically extended after five years, unless one of the signatories requests otherwise. Putin said the agreement was “in the interests of the people of Armenia and Azerbaijan.”

Azerbaijan, on the other hand, gets open transit to Nakhichevan.