Armenian soldiers march in Yerevan on Monday , protesting against Serzh Sargsyan
Opposition supporters accused Mr Sargsyan of clinging to power after he was appointed prime minister last Tuesday, soon after finishing two five-year terms as president.
“The street movement is against my tenure. I am fulfilling your demand,” he said in a statement.
Former prime minister Karen Karapetyan takes over as acting PM, reports said.
The announcement came soon after opposition leader Nikol Pashinyan was released from detention. Mr Pashinyan had been arrested on Sunday after televised talks with Mr Sargsyan collapsed.
As well as Mr Pashinyan, two other opposition politicians and some 200 demonstrators were held.
In his statement published on his website, Mr Sargsyan said he was “addressing all citizens of the Republic of Armenia… for the last time as leader of the country.”
“Nikol Pashinyan was right. I was wrong,” he said. “The situation has several solutions, but I will not take any of them… I am leaving office of the country’s leader, of prime minister.”
His spokesman, Hovhannes Nikoghosyan, told the BBC that Mr Sargsyan was behaving responsibly and fulfilling the demands of the street movement which opposed his appointment as prime minister.
“I think his resignation is a clear demonstration of a democracy in force. It’s not that every demonstration in every corner of the world leads to the resignation of the authorities,” Mr Nikoghosyan said.
Protesters chanted “Nikol, Nikol” in the streets on Monday and waved Armenian flags. They were joined by hundreds of uniformed soldiers, despite warnings from the defence ministry that any soldiers protesting would be harshly punished.
Mr Pashinyan congratulated the people on their “victory” following the resignation. “You have won, proud citizens of the Republic of Armenia. And no one can seize this victory from you. I congratulate you, victorious people,” he wrote on Facebook.
All rights reserved. This material, and other digital content on this website, may not be reproduced, published, broadcast, rewritten or redistributed in whole or in part without prior express written permission from LEADERSHIP Nigeria Newspapers. Contact: [email protected]