Armenia and Azerbaijan agreed on a deal with Russia to end weeks of fierce clashes over Nagorno-Karabakh on Tuesday, after a string of Azerbaijani victories in its fight to retake the disputed region.
The announcement of a full ceasefire from 1:00 am Tuesday (2100 GMT) sparked outrage in Armenia, with angry protesters storming the government headquarters in Yerevan where they ransacked offices and broke windows.
Crowds also seized control of parliament, calling from inside the chamber for the resignation of Prime Minister Nikol Pashinyan after he announced the "painful" deal to the end the fighting.
"I have signed a statement with the presidents of Russia and Azerbaijan on the termination of the Karabakh war," Pashinyan said, calling the move "unspeakably painful for me personally and for our people".
"I have taken this decision as a result of an in-depth analysis of the military situation," he added.
Azerbaijan's President Ilham Aliyev said Pashinyan had been left with no choice but to sign the "historic agreement".
"An iron hand forced him to sign this document," Aliyev said in televised remarks. "This is essentially a capitulation."
Russian President Vladimir Putin confirmed that both Armenia and Azerbaijan had agreed to "a total ceasefire" that would create the conditions for a long-term settlement of the conflict.
He said the two sides would hold on to areas under their control and that Russian peacekeepers would be deployed along frontlines and to secure a corridor connecting Nagorno-Karabakh with Armenian territory.
Russian news agencies quoted the defence ministry as saying 1,960 peacekeepers would be deployed with 90 armoured vehicles.
Aliyev said Armenia had agreed to a timetable to withdraw its forces from large parts of the region and that Azerbaijan's ally Turkey would be involved in implementing the ceasefire.
The deal would end six weeks of fierce clashes over Nagorno-Karabakh, an ethnic Armenian region of Azerbaijan that broke away from Baku's control during a bitter war in the 1990s.
The conflict -- which has simmered for decades despite international efforts to reach a peace deal -- erupted into fresh fighting in late September.
More than 1,300 people have been confirmed killed, including dozens of civilians, but the actual death toll is believed to be significantly higher.
Azerbaijani forces made steady gains over the weeks of fighting, sweeping across the southern flank of Nagorno-Karabakh and eventually into the region's heartland.
A turning point came on Sunday when Aliyev announced that his forces had captured Shusha, the region's strategically vital second-largest town.
Shusha sits on cliffs overlooking Nagorno-Karabakh's main city Stepanakert and on the main road to Armenia, which backs the separatists.
Armenia insisted earlier on Monday that fighting for the town was continuing but a local separatist official admitted that Shusha was "completely out of our control".
The ceasefire deal came just hours after Azerbaijan admitted to accidentally shooting down a Russian military helicopter flying in Armenia.
Moscow's defence ministry said two crew members were killed when the Mi-24 helicopter was hit close to the border with Azerbaijan. A third crew member was injured and evacuated.
Azerbaijan quickly apologised and blamed the incident on the "tense situation in the region and increased combat readiness" of its forces.
The helicopter was shot down near the Nakhchivan Autonomous Republic, a landlocked exclave of Azerbaijan between Armenia and Turkey, far from Nagorno-Karabakh.
Russia has a military pact with Armenia and a base in the country, but had insisted it would not get involved in the conflict with Azerbaijan unless Armenian territory itself came under threat.
Karabakh declared independence nearly 30 years ago but the declaration has not been recognised internationally, even by Armenia, and it remains a part of Azerbaijan under international law.
Repeated attempts at ceasefires brokered by France, Russia and the United States -- who together lead the "Minsk Group" that has sought for years to end the conflict -- repeatedly failed over the last few weeks.
Azerbaijan has been pushing for Turkey's involvement in a settlement and the new deal came after Putin spoke with Turkish President Recep Tayyip Erdogan on Saturday.
Anger had already been mounting in Armenia ahead of the agreement, with 17 opposition parties on Monday calling on Pashinyan and the rest of his government to immediately resign.
The parties said in a statement that Armenia's leaders bore "the entire responsibility for the situation" in Karabakh.
"The authorities have lost their moral and political basis to represent the people," they said.
Related Story