Opposition politician Nikol Pashinyan spearheaded weeks of protests in Armenia that brought an end to 10 years of rule by Serzh Sargsyan.
Now he has persuaded a parliament dominated by Mr Sargsyan's own party to back him as prime minister, only a week after he lost an initial vote.
After MPs voted again on Tuesday, thousands of supporters cheered in Republic Square in the capital Yerevan.
Rock star Serj Tankian of the band System of a Down was among the crowds.
Mr Pashinyan, who led what has become known as Armenia's "Velvet Revolution", promised MPs that human rights would be protected, and that corruption and election-rigging would end.
"All people are equal before the law. There will be no people enjoying privileges in Armenia. That's it. Full stop," he said.
Why does this matter?
A landlocked nation of 2.9 million people, Armenia is dependent on Russia for its security and has a Russian military base on its territory.
Armenia's peaceful uprising against single-party rule - and the way its political leaders responded - is seen as unprecedented for a former Soviet state. Russia has not intervened in the recent political events and Mr Pashinyan told MPs that relations with Moscow would be a priority, particularly military co-operation.
Russian President Vladimir Putin immediately welcomed Mr Pashinyan's success, looking forward to continuing "friendly relations". Armenia is part of Russia's collective security organisation as well as its Eurasian economic union.
Armenia is also involved in a long-lasting conflict with Azerbaijan over the mountainous territory of Nagorno-Karabakh, an enclave with an ethnic Armenian majority that lies inside Azerbaijan's borders.
After 10 years in power Mr Sargsyan left Armenia's presidency last month only to be elected prime minister by a parliament controlled by his Republican party.
Mr Sargsyan's move was seen by critics as a way of clinging to office. Under a 2015 referendum marred by irregularities, Armenia shifted powers from the presidency to parliament.
Mr Pashinyan, who had begun a protest march to Yerevan ahead of the president's switch to prime minster, arrived in the capital to lead daily protests.
On 22 April he held a brief meeting with Mr Sargsyan but was then detained when the talks collapsed. The following day, he was freed and Mr Sargsyan resigned as prime minister, six days after he had been elected.
On 1 May, a parliament dominated by the ruling Republican party rejected Mr Pashinyan as prime minister, even though he was the only candidate. A general strike across Armenia took place the following day, and eventually Republican MPs agreed they would back him in an 8 May vote.
Edited by onjig, 08 May 2018 - 04:38 PM.