The surprise move followed 10 days of protests in the capital Yerevan against Serzh Sargsyan's appointment as prime minister, a position that holds most power under the new constitution.
Armenian Prime Minister Serzh Sargsyan resigned unexpectedly on Monday, an apparent move to bring to an end massive anti-government protests.
The surprise move, announced on his website, followed 10 days of protests in the capital, Yerevan, against Sargsyan's appointment as prime minister.
Sargsyan, a close ally of Russian President Vladimir Putin, had faced accusations of clinging to power when parliament voted for him to take up the post of prime minister.
PM holds most power
Critics saw the move as an attempt to stay in power by Sargsyan, who served as president from 2008 until term limits forced him out in March.
Armen Sarkisian, a former prime minister and ambassador to Britain, was elected in his place.
Under a revised constitution, the prime minister now holds most power in the impoverished southern Caucasus nation, while the presidency has become largely ceremonial.
TRT World's Reagan Des Vignes reports.
Thousands of anti-government protesters have been rallying the streets of Yerevan since April 13, and Sunday's rally attracted some 50,000 demonstrators.
Police on Monday released opposition leader Nikol Pashinyan a day after his detention, a live broadcast feed of the event on social media from Yerevan showed.
Police had detained three opposition leaders, including Pashinyan, and nearly 200 protesters on Sunday, drawing a rebuke from the European Union after demonstrators demanded newly appointed prime minister quit.
Men wearing military uniforms could be seen marching in Yerevan with protesters.
Images broadcast on the Internet and social media showed the soldiers hugging protesters and waving the country's national flag.
The Armenian Defence Ministry condemned what it said was their illegal action, saying the men belonged to a brigade of military peacekeepers.
"The harshest legal measures will be taken against the soldiers," it said in a statement.