Armenian Prime Minister Serzh Sargsyan stepped down Monday amid large-scale protests against corruption and his rule, a move that potentially could alter the former Soviet republic’s reliance on Russia. 

Demonstrations against the pro-Russian Sargsyan erupted almost two weeks ago when he was appointed prime minister after a decade as president, part of a new transition of governance that bolsters the role of the premier. The move effectively tightened the 63-year-old’s grip over the country in the South Caucasus. 

Sargsyan was quickly replaced Monday by his close ally, First Deputy Prime Minister Karen Karapetyan, who previously worked for the Russian gas giant Gazprom. It was not clear whether this move would placate the protesters, who oppose the ruling elite as a whole. 

Sargsyan’s political opponents accused him of changing the law so he could effectively retain power into a second decade. The protests, which drew about 100,000 people, including clergy and unarmed soldiers, paralyzed the center of the capital, Yerevan, for 11 consecutive days. They were led by opposition lawmaker Nikol Pashinyan, who was arrested along with hundreds of demonstrators Sunday and released just hours before Sargsyan resigned. 

“The street movement is against my tenure. I am fulfilling your demand,” Sargsyan wrote to his country’s citizens in a statement of resignation on his official website. “Nikol Pashinyan was right. I was wrong.”

Upon hearing of his resignation, protesters in Yerevan shouted in jubilation, car horns honked and Armenian news outlets showed pictures of men dancing in the streets.

Russia appeared to cautiously approve of Sargsyan’s resignation.

“Armenia, Russia is always with you!” Foreign Ministry spokeswoman Maria Zakharova wrote on her Facebook page, praising Armenians for refraining from violence. Under Sargsyan’s rule, Armenia bought weapons from Moscow and joined the Eurasian Economic Union, a Russian-backed economic bloc designed to deter neighboring countries from trading with Europe. 

Joining Russia’s trade bloc four years ago failed to bring a promised economic boost to Armenia’s 3 million people, about a third of whom live below the poverty line. Unlike popular movements in pro-democracy revolutions in recent years in Ukraine and Georgia, the opposition in Armenia has not said it wishes to be allied with Europe. But that could change. 

“For the first time since 1991, Armenian people are celebrating domestic political victory, and this sense of empowerment could become a force in itself despite very difficult challenges ahead,” said Lilit Gevorgyan, senior economist for Russia and the former Soviet Union at IHS Markit.

The protests contrasted starkly with those a decade ago, when at least eight people in Yerevan were killed in clashes between police and anti-government demonstrators who alleged that Sargsyan’s presidential victory was rigged.

Russia’s marginalized opposition on Monday praised the Armenian protesters and repeated its call for a demonstration against Russian President Vladi­mir Putin in two weeks, ahead of his inauguration for a new six-year term. 

Landlocked and poor, Christian Armenia has been largely dependent on Russia since the Soviet Union fell apart just over a quarter-century ago. A simmering, decades-long conflict with Armenia’s Muslim-majority neighbor, Azerbaijan, over the breakaway Nagorno-Karabakh region has only enhanced its reliance on Moscow.