YEREVAN, Armenia — Armenia and Azerbaijan announced an agreement early Tuesday to halt fighting over the Nagorno-Karabakh region of Azerbaijan under a pact signed with Russia that calls for deployment of nearly 2,000 Russian peacekeepers and territorial concessions.
Nagorno-Karabakh has been under the control of ethnic Armenian forces backed by Armenia since a 1994 truce ended a separatist war in which an estimated 30,000 people died. Sporadic clashes occurred since then, and full-scale fighting began on Sept. 27.
Several cease-fires had been called but were almost immediately violated. However, the agreement announced early Tuesday appeared more likely to take hold because Azerbaijan has made significant advances, including taking control of the strategically key city of Shushi on Sunday.
Armenian Prime Minister Nikol Pashinian said on Facebook that calling an end to the fight was "extremely painful for me personally and for our people."
Soon after the announcement, thousands of people streamed to the main square in the Armenian capital Yerevan to protest the agreement, many shouting, "We won't give up our land!" Some of them broke into the main government building, saying they were searching for Pashinian, who apparently had already departed..
The agreement calls for Armenian forces to turn over control of some areas it held outside the borders of Nagorno-Karabakh, including the eastern district of Agdam. That area carries strong symbolic weight for Azerbaijan because its main city, also called Agdam, was thoroughly pillaged, and the only building remaining intact is the city's mosque.
Armenians will also turn over the Lachin region, which holds the main road leading from Nagorno-Karabakh to Armenia. The agreement calls for the road, the so-called Lachin Corridor, to remain open and be protected by Russian peacekeepers.
In all, 1,960 Russian peacekeepers are to be deployed in the region under a five-year mandate.
The agreement also calls for transport links to be established through Armenia linking Azerbaijan and its western exclave of Nakhcivan, which is surrounded by Armenia, Iran and Turkey.
Azerbaijani forces on Monday shot down a Russian helicopter that was flying over Armenia near the border with Nakhchivan, killing two servicemen. Azerbaijan's foreign ministry said the helicopter was flying low and "in the context of these factors and in light of the tense situation in the region and increased combat readiness in connection with possible provocations of the Armenian side, the duty combat crew decided to open fire to kill."
The seizure of Shushi, which Azerbaijani President Ilham Aliyev claimed Sunday and was confirmed by Nagorno-Karabakh's presidential spokesman Monday, gave Azerbaijan a significant strategic advantage. The city is positioned on heights overlooking the regional capital of Stepanakert, 10 kilometers (six miles) to the north.
"Unfortunately, we are forced to admit that a series of failures still haunt us, and the city of Shushi is completely out of our control," Vagram Pogosian, a spokesman for the president of the government in Nagorno-Karabakh, said in a statement on Facebook. "The enemy is on the outskirts of Stepanakert."
Since the 1994 end of the previous war, international mediation efforts by the Organization for Security and Cooperation in Europe's "Minsk Group" to determine the region's final status faltered and the region was separated from the rest of Azerbaijan by a demilitarized zone.
Aliyev on Monday urged U.S. President-elect Joe Biden to intensify mediation efforts. In a congratulatory letter to Biden on his election victory, Aliev said, "Azerbaijan expects the United States and other OSCE Minsk Group co-chairs to step up their efforts to find a just solution to the conflict."
Armenia says more than 1,200 Armenian troops have been killed in the war. Azerbaijan hasn't stated its losses.