The move follows days of protests against Sargsyan, whom protesters accuse of clinging to power. Earlier on Monday, opposition leader Nikol Pashinian, who was detained for his role in the protests, was released.
Armenian Prime Minister Serzh Sargsyan stepped down on Monday amid widespread protests over his tenure, according to his official website. Protesters in the capital, Yerevan, accused him of holding on to power and demanded his resignation.
"I got it wrong," Sargsyan said in a statement issued by his office. "In the current situation there are several solutions, but I won't choose any of them. It's not my style. I am quitting the country's leadership and the post of prime minister of Armenia."
Yerevan residents took to the streets to celebrate Sargsyan's departure. People hugged and kissed each other, and motorists honked their horns.
The Armenian government named former Prime Minister Karen Karapetian, a Sargsyan ally, as acting premier.
Sargsyan's resignation came soon after protest leader and opposition lawmaker Nikol Pashinian was released on Monday, after having been detained on Sunday following unsuccessful talks with Sargsyan.
Livestreamed TV images showed the leader of the opposition Civil Contract Party surrounded by supporters waving Armenian flags in Yerevan, where he had been leading 10 days of mass protests against Sargsyan, who was elected prime minister by parliament last week.
Tens of thousands of Armenians took to the streets in recent days to protest what they saw as Sargsyan's efforts to remain in power after his second and final term as president ended earlier this year.
A national referendum in 2015 led to changes to the constitution that introduced a parliamentary system of government and transferred governing powers from the president to the prime minister.
Soldiers join protest
Earlier on Monday, the Armenian Defense Ministry said a group of Armenian soldiers joined the illegal anti-government protest on Monday, according to Reuters news agency, promising that the soldiers would be harshly punished according to the law.
Images of hundreds of men wearing military uniforms marching with protesters had earlier appeared on a live stream of the demonstrations being broadcast on the Internet.
Sargsyan has also faced flak for his proximity to Russian leader Vladimir Putin.
Sargsyan's bid to cling to power echoed similar tenure-lengthening maneuvers by the Russian president.
Moscow, which has decried past anti-government rallies as Western interference, has been cautious in commenting on the present unrest.
Russian Foreign Ministry spokeswoman Maria Zakharova lauded Sargsyan's decision as a move to unify the nation.
"The people who have the strength to keep respect toward each other despite crucial differences and stay united even in the most difficult moments of its history is a great people," Zakharova wrote on her Facebook account. "Armenia, Russia is always with you!"
Acting PM Karapetian too has close ties with Russia. She worked in Russia for five years as a senior executive of state-controlled gas giant Gazprom.
law, ap/rt (AP, AFP, Reuters)