Serzh Sargsyan has resigned as prime minister of Armenia after thousands of people poured into the streets to protest over his political manoeuvring to cling to power.

The stunning development touched off jubilation in the capital Yerevan, with car horns blaring and people dancing, hugging and waving the tricolour national flag.

The opposition in the former Soviet republic called for a meeting with the acting prime minister to discuss a “peaceful transfer of power”.

Opposition protests in Yerevan
Opposition protests in Yerevan (Narek Aleksanyan, PAN/AP)

Mr Sargsyan, 63, was president of the Caucasus mountains nation from 2008 until term limits forced him out in March, but parliament, which is controlled by his party, voted to reduce the powers of the presidency and give them to the prime minister, installing him in that post.

The move echoed a manoeuvre a decade ago by Russian President Vladimir Putin, Armenia’s closest ally.

Leaders of other former Soviet republics, from Belarus to Central Asia, have similarly extended their terms.

The parliament’s action triggered massive anti-government protests in the streets of Yerevan from April 13, with demonstrators blocking government buildings and facing off with police.

A rally on Sunday attracted about 50,000 people, and about 200 soldiers joined the protesters on Monday.

On Sunday, protest leader Nikol Pashinian met Mr Sargsyan, who walked out of the session after Mr Pashinian refused to talk about anything but the prime minister’s resignation.

Mr Pashinian was later arrested but abruptly released on Monday.

Serzh Sargsyan leaves a meeting with protest leader Nikol Pashinia
Serzh Sargsyan leaves a meeting with protest leader Nikol Pashinia (Hrant Khachatryan/PAN/AP)

In a surprise announcement posted on his website, Mr Sargsyan said he should not have resisted the opposition’s demands.

“Nikol Pashinian was right. I was wrong,” he said. “The movement on the streets is against my rule. I’m complying with their demands.”

The government quickly named former prime minister Karen Karapetian as acting prime minister.

A Sargsyan ally, he also was mayor of Yerevan and worked in Russia for five years as a senior executive of the state-controlled gas giant Gazprom.

Mr Pashinian told an evening rally of tens of thousands of people in Republic Square, Yerevan, that opposition activists want to meet Mr Karapetian on Wednesday to discuss a “peaceful transfer of power”.

The opposition will push for an early parliamentary election to prevent Mr Sargsyan from running Armenia from behind the scenes, Mr Pashinian said.