Thousands of jubilant Armenians have poured into Yerevan's main square to celebrate the resignation of Prime Minister Serzh Sarkisian, who stepped down amid widespread street protests over his election to the newly powerful post following 10 years as president.
"Dear proud citizens of the Republic of Armenia, you have won!" protest leader Nikol Pashinian told the cheering crowd packed into Republic Square on April 23.
He suggested that there were no foreign countries involved in the protest movement, calling it a "purely Armenian velvet revolution."
In a dramatic turn of events a day after he had rejected opposition demands for his resignation, Sarkisian made a pointed and direct statement to the country on April 23, saying that he was acquiescing to calls from Pashinian and the demonstrators the opposition lawmaker had led for 11 days and leaving office.
"The movement of the street is against my tenure. I am fulfilling your demand," Sarkisian said in a statement on the prime minister's website.
"Nikol Pashinian was right. I was wrong," he said, adding a suggestion that he did not want to resort to force to stay in office.
"In the current situation there are several solutions, but I won't choose any of them," he said. "It's not my style. I am quitting the country's leadership and the post of prime minister of Armenia."
WATCH: Armenians dance on the street at the news of Sarkisian's resignation
The government named former Prime Minister Karen Karapetian, an ally of Sarkisian, as acting prime minister.
Under Armenia's constitution, political factions in parliament now have seven days to put forward the name of a new prime minister.
In his address on Republic Square, Pashinian said that the "revolution" must not stop with Sarkisian's resignation, but continue to "final victory."
Pashinian said he planned to discuss a "peaceful transfer of power" with Karapetian on April 25, adding that snap parliamentary elections should be held "within a reasonable time frame."
"I hope that the leaders of [Sarkisian's] Republican Party will unequivocally and unconditionally recognize the victory of the people's velvet, nonviolent revolution," he said.
Pashinian also said that all the demonstrators who were detained or arrested during the protest movement must be released by the end of the day.
Sarkisian was elected prime minister by parliament on April 17, eight days after his two-term presidency ended. His handpicked successor, Armen Sarkisian -- who is not related, was sworn in as president on April 9 after being elected by parliament.
But under constitutional changes that Serzh Sarkisian pushed through in 2015, the prime minister is now more powerful than the president, who is more of a figurehead.
Sarkisian had previously said he would not seek to become prime minster, and protesters were upset for his violation of that pledge, claiming the shift threatened to make the 63-year-old leader for life.
The announcement came just hours after Pashinian and two other opposition lawmakers were released from police custody, a day after they were detained for their role in protests that had at times crippled the capital's streets and major roads leading to other cities.
Protesters had also rallied in Gyumri and Vanadzor, the second- and third-largest cities in the country that borders Georgia, Azerbaijan, Turkey, and Iran.
The protests, which started mainly among younger Armenians, had been gaining in size and intensity. About 200 men wearing army uniforms linked arms had joined in the march on April 23, a sign of the increasing pressure Sarkisian faced.
PHOTO GALLERY: Armenians dance in the streets
The peaceful protests had roiled the former Soviet republic of about 3 million, a Russian ally in a volatile region plagued by the persistent conflict between Armenia and Azerbaijan over Nagorno-Karabakh. The demonstrations were a relatively rare example of civil protest effecting major political change in the former Soviet Union.
The spokeswoman for Russia's Foreign Ministry voiced solidarity with Armenia following Sarkisian's resignation.
"A people that has the ability to maintain respect for one another and not divide even in the most difficult moments in its history -- despite categorical differences -- is a mighty people," Maria Zakharova wrote on Facebook.
"Armenia, Russia is always with you," she added.
In a statement, European Union foreign-policy chief Federica Mogherini’s spokeswoman, Maja Kocijancic, said that a national dialogue involving all political stakeholders in Armenia was "crucial" to resolve the current situation quickly and peacefully.
The president of Radio Free Europe/Radio Liberty, Thomas Kent, called the attacks against three RFE/RL journalists during mass rallies in Yerevan over the weekend "unacceptable" and called for swift and appropriate measures to ensure the perpetrators are held accountable.
"The fact that police have been among the perpetrators, or have abetted them, is especially disturbing," Kent said in a statement.
On April 22, the U.S. Embassy to Armenia expressed concern over "reports of violence against journalists and demonstrators," and called for accountability for those responsible.
Fears were building that the peaceful protests might turn violent, especially with police authorities arresting scores daily and issuing warnings that they would not tolerate unlawful rallies.
Local news agency Armenpress quoted Georgy Kutoian, the director of the country's National Security Service, as saying on April 23 that the events "are already a serious challenge to our statehood."
WATCH: Security forces detain protest leader Pashinian
Sarkisian's shock move comes a day before Armenians hold annual ceremonies to honor the victims of mass killings in 1915 in Ottoman Turkey, which Armenia and some other countries consider genocide.
Sarkisian and Pashinian tried to hold talks a day earlier, but they ended quickly with the prime minister accusing his opponents of "blackmail" and walking out after about three minutes.
Pashinian accused Sarkisian of losing touch with reality and he urged his supporters to turn out in larger numbers for peaceful civil-disobedience protests across the country.
He said that he told the president he would only negotiate with the government "the terms of Serzh Sarkisian's resignation and a peaceful transition of power." He also said that as long as the protests were peaceful, the police should not break them up.
Before walking out, Sarkisian said that Pashinian's political alliance had "only six or seven percent of the vote" in parliamentary elections, and that he should not to speak on behalf of the people or issue ultimatums to the government.
WATCH: Sarkisian walks out of meeting with Pashinian
Critics say Sarkisian has brought Armenia too close to Moscow and President Vladimir Putin, with whom he has a close relationship.
Armenia is a member of the Eurasian Economic Union and the Collective Security Treaty Organization (CSTO), two regional groupings that observers say Russia is using to try to maintain influence in the region and keep members from forging closer ties with the West.
Putin also switched between the positions of president and prime minister to remain in power, becoming head of government in 2008 when he faced a limit of two straight terms, and then returning to the presidency in 2012.
Another regional leader, Turkish President Recep Tayyip Erdogan, also changed positions, becoming head of state after years as prime minister. Erdogan also beefed up the powers of the presidency to tighten his grip on power.