Myanmar's parliament elected a close friend and confidant of Nobel laureate Aung San Suu Kyi as president on Tuesday, making Htin Kyaw the first head of state since the 1960s who does not hail from a military background.
Suu Kyi led her National League for Democracy (NLD) to a landslide election win in November, but a constitution drafted by the former junta bars her from the top office.
She has vowed to run the country anyway through a proxy president, and on Thursday the NLD nominated Htin Kyaw for the role. He runs a charity founded by Suu Kyi and has been a trusted member of her inner circle since the mid-1990s. He is not a lawmaker.
"Today's result is because of the love of people for her. It is the victory of my sister Aung San Suu Kyi," Htin Kyaw told reporters after the vote.
The United States, which has backed Myanmar's transition to civilian government and refers to the country as Burma, called Htin Kyaw's election "yet another important step forward in Burma's democratic transition."
White House spokesman Josh Earnest told a regular briefing that while important progress had been made, additional steps were needed and Washington would continue to back reform.
China's embassy offered congratulations for the election of state leaders and said it hoped "to continuously push forward the friendly and cooperative relationship between China and Myanmar."
The sizeable NLD majority ensured a comfortable win for Suu Kyi's pick in a vote by both houses of parliament. Htin Kyaw received 360 of the 652 votes cast.
Suu Kyi was the first member of parliament to vote and clapped and smiled when the result was announced.
Outgoing President Thein Sein congratulated the man who will replace him on April 1.
"On behalf of the nation and the people, I take pride in your being elected as the president," he said.
NLD lawmakers, most of whom have no experience as members of parliament, spent time rehearsing how they would vote the night before the election, a Reuters witness said.
They were keen to ensure there were no last-minute mistakes that would cost them a presidency they had campaigned for decades to see.
"This is the big day for us," Zar Ni Min, an NLD lower house MP, said after the vote. "This is what we have hoped for for a long time."
Yanghee Lee, the U.N. Special Rapporteur on human rights in Myanmar, said there was no time for complacency because Myanmar had hundreds of laws that were out of line with its international obligations, and people could be sentenced to hard labour for "all kinds of reasons".
The change of government was also a chance to break the "tragic status quo situation" of a million minority Rohingya Muslims who have been deprived of their most fundamental rights, she said.
Tens of thousands of Rohingyas have fled poverty and persecution in western Myanmar since religious violence erupted in 2012, and Lee told a news conference in Geneva she was afraid more would flee in the 2016 sailing season.
The still-powerful military holds a quarter of parliamentary seats and the constitutional right to nominate one of the three presidential candidates. Its candidate, retired general Myint Swe, received 213 votes and becomes first vice president.
Relations between the armed forces and Suu Kyi will define the success of Myanmar's most significant break from military rule since the army seized power in 1962.
Tensions have simmered in the run-up to the election and as the NLD prepares to take power.
Suu Kyi wants to demilitarize Myanmar's politics but effectively needs the support of the military to do this.
The armed forces are guaranteed three ministries under the constitution and enough parliamentary seats to give them a veto over constitutional amendments - enough to limit the potential scope of Suu Kyi's reforms.
Sources in Suu Kyi's camp say she has grown increasingly frustrated with military intransigence on issues ranging from amending the constitution to relatively minor formalities such as the location of the handover of power.
NLD lawmakers also say the military's choice of Myint Swe, who served the junta as head of the feared military intelligence and is on the U.S. sanctions list, goes against the spirit of reconciliation Suu Kyi is seeking to foster.
The third presidential candidate, Henry Van Thio, was also nominated by the NLD. He will become second vice president and was chosen by Suu Kyi to represent Myanmar's numerous ethnic minorities. He is a member of the Chin ethnic group.
The president picks the cabinet that will take over from Thein Sein's outgoing government, with the exception of the heads of the home, defence and border security ministries, who will be appointed by the armed forces chief.