|People celebrated Armenian prime minister Serzh Sarkisian's resignation|
in downtown Yerevan (AFP Photo/KAREN MINASYAN)
Last week Sarkisian was elected prime minister by lawmakers after serving a decade as president, triggering political turmoil in the Moscow-allied nation of 2.9 million people.
The opposition said the move was designed to extend his chokehold on power under a new parliamentary system of government. Tens of thousands of protesters took to the streets of the capital Yerevan in recent days.
The 63-year-old Sarkisian -- who earlier refused to step down -- stunned the country Monday by saying he was in the wrong and resigning.
His announcement came shortly after the release of protest leader Pashinyan who had been detained by police on Sunday.
"I am leaving the post of the country's leader," pro-Moscow Sarkisian was quoted as saying in a statement by his office.
"Nikol Pashinyan was right. I was wrong."
Sarkisian implied that there were several ways to resolve the crisis and that he could have used force to break up protests but chose not do to it.
"This is not in my nature," he added.
Sarkisian quit after a number of serving and former soldiers joined the protests.
Spontaneous street parties broke out and many flocked to stores to buy wine to
toast to the country's future (AFP Photo/KAREN MINASYAN)
Armenians cheered the resignation, dancing, hugging each other and setting off fireworks.
"The people won!" shouted supporters of Pashinyan as some people waved national flags and others tooted car horns, on the 11th day of demonstrations.
Spontaneous street parties broke out as tens of thousands took to the streets. Many flocked to stores to buy wine and raise a toast to the country's future.
"You have won, the proud citizens of Armenia!" Pashinyan, the 42-year-old leader of the Civil Contract Party, wrote on Facebook.
"And no one will be able to take this victory away from you. I congratulate you, the victorious people."
First Vice Premier Karen Karapetyan has been appointed acting head of government.
Sarkisian remained the country's top leader even after he transitioned to the post of prime minister following constitutional amendments approved in 2015, which transferred powers from the presidency to the premiership.
Sarkisian, a shrewd former military officer, was first elected president of the impoverished, Moscow-allied country in 2008.
He also held the office of prime minister from 2007 to 2008.
Armenian Prime Minister Serzh Sarkisian (left) stormed out of a tense televised debate
with opposition leader Nikol Pashinyan on Sunday (AFP Photo/Vano SHLAMOV)
After the 2008 presidential vote, 10 people died in clashes between police and supporters of the defeated opposition candidate.
The Kremlin said it was closely watching the political crisis in Armenia -- which hosts a Russian military base -- but would not interfere.
Sarkisian's peaceful departure after a decade in power has been hailed as unprecedented.
"For the first time ever the people forced the head of state to resign," said 46-year-old Arman Sarkisian (no relation to Serzh Sarkisian).
"This has never happened before. From now on those who will replace him will think twice before taking decisions."
Gohar Badalyan, a 21-year-old student, added: "A new life is beginning today."
Sarkisian had earlier refused to go and on Sunday stormed out of televised talks with Pashinyan, accusing him of "blackmail".
Over the past days, thousands of opposition supporters held rallies against Sarkisian, denouncing his failure to fight poverty, corruption and the influence of oligarchs.
They blocked roads and marched arm-in-arm holding Armenian flags, with students and a group of serving soldiers joining the protests.
A number of uniformed former soldiers and veterans who fought in Nagorny Karabakh -- a breakaway region seized by Armenian separatists after the collapse of the Soviet Union -- also joined the demonstrations.
Despite the festive mood, many in Armenia acknowledged on Monday that the country still faced huge uncertainty.
Armenians hailed Sarkisian's peaceful departure after a decade in power as
unprecedented in the country's history (AFP Photo/Vano SHLAMOV)
Andranik Serobyan, a teacher, said the "hardest part is ahead".
"Who will be the prime minister? Who will be the country's leader? We will have to live through all of this."
In Moscow, President Vladimir Putin's spokesman -- who spoke to reporters before Sarkisian resigned -- said that Russia was carefully watching events in Armenia, which has retained close ties to its former Soviet master.
"We are very attentively observing what is happening in Armenia," President Vladimir Putin's spokesman Dmitry Peskov said, calling the South Caucasus country "extremely important" for Russia.
Peskov dismissed a question on whether Russia would interfere in the crisis -- which he called "exclusively an internal affair" -- as "absolutely inappropriate."