Malaysia's Anwar Ibrahim was sworn in as prime minister on Thursday, capping a three-decade political journey from a protege of veteran leader Mahathir Mohamad to protest leader and finally, opposition leader.
His appointment ends five days of unprecedented post-election crisis, but could usher in a new instability with his rival, former prime minister Muhyiddin Yassin, challenging him to prove his majority in parliament.
Both men failed to win a majority in a Saturday election, but the constitutional monarch, King Al-Sultan Abdullah, appointed Anwar after speaking to several lawmakers.
Anwar takes over at a challenging time: the economy is slowing and the country is divided after a tight election that pitted Anwar's progressive coalition against Muhyiddin's mostly conservative alliance.
Markets surged upon the end of the political deadlock. The ringgit currency posted its best day in two weeks and equities .KLSE rose 3 per cent.
The 75-year-old Anwar has time and again been denied the premiership despite getting within striking distance over the years: he was deputy prime minister in the 1990s and the official prime minister-in-waiting in 2018.
In between, he spent nearly a decade in jail for corruption in what he says were politically motivated charges aimed at ending his career.
The uncertainty over the election threatened to prolong political instability in the Southeast Asian country, which has had three prime ministers in as many years, and risks delaying policy decisions needed to foster economic recovery.
Anwar's supporters expressed hope that his government would head off a return to historic tension between the ethnic Malay, Muslim majority and ethnic Chinese and Indian minorities.
"All we want is moderation for Malaysia and Anwar represents that," said a communications manager in Kuala Lumpur, who asked to be identified by her surname Tang.
"We can't have a country that is divided by race and religion as that will set us back another 10 years."
Anwar told Reuters in an interview before the election that he would seek "to emphasize governance and anti-corruption, and rid this country of racism and religious bigotry" if appointed premier.
His coalition, known as Pakatan Harapan, won the most seats in Saturday's vote with 82, while Muhyiddin's Perikatan Nasional bloc won 73. They needed 112 - a simple majority - to form a government.
The long-ruling Barisan bloc won only 30 seats - the worst electoral performance for a coalition that had dominated politics since independence in 1957.
Barisan said on Thursday it would not support a government led by Muhyiddin, though it did not make any reference to Anwar.
Muhyiddin, after Anwar's appointment, asked Anwar to prove his majority in parliament.