Key Points
- Anwar Ibrahim is the country's new PM, ending five days of political uncertainty.
- He has been opposition leader for two decades and has survived jail terms and political coups.
- Saturday's election result left Malaysia facing a hung parliament for the first time in its political history.
Malaysia's perennial opposition leader Anwar Ibrahim was named prime minister on Thursday, ending a days-long political impasse after inconclusive election results.
The 75-year-old was scheduled to be sworn in at 5 pm (0900 GMT), becoming the country's fourth leader in as many years.
His ascension will cap a turbulent political life for Anwar, during which he has sat near the apex of power, as well as serving jail time on corruption and sodomy charges.
"After taking into consideration the views of Their Royal Highnesses the Malay Rulers, His Majesty has given consent to appoint Anwar Ibrahim as the 10th Prime Minister of Malaysia," read a statement from the palace of the king, Sultan Abdullah Ahmad Shah.
Anwar's multi-ethnic Pakatan Harapan coalition won the most seats in the weekend's election, on an anti-graft message.
But its total of 82 seats was short of the required 112.
The king had summoned Anwar and former prime minister Muhyiddin Yassin - whose Perikatan Nasional bloc got 73 seats - in an attempt to break the deadlock, but no deal could be struck.
Muhyiddin, who was backed by an Islamist party, told reporters Tuesday that the monarch had initially asked him and Anwar to form a "unity government".
Rollercoaster journey
For Anwar, the premiership is the culmination of a rollercoaster 25 years.
The firebrand former student activist was close to power in the late 1990s, as finance chief and deputy prime minister to Mahathir Mohamad.
But the two had a bitter falling-out over how to handle the 1997-98 Asian financial crisis.
Mahathir sacked Anwar, who was also expelled from their then party the United Malays National Organisation (UMNO), and charged with corruption and sodomy.

A file photo of Anwar Ibrahim addressing a gathering of supporters prior to his arrest and trial for a variety of corruption and sexual misconduct charges on 20 Setpember 1998. Source: AAP / Vincent Thian
As Anwar claimed political persecution, street protests erupted and evolved into a movement calling for democratic reforms.
The Mahathir-Anwar tussle has dominated and shaped Malaysian politics over the past four decades, "alternately bringing despair and hope, progress and regress to the country's polity", according to Oh Ei Sun of the Pacific Research Center of Malaysia.
The Malaysian Supreme Court overturned Anwar's sodomy conviction in 2004 and ordered him freed.
'Long time coming'
Anwar allied with Mahathir during the 2018 elections, when his erstwhile tormentor came out of retirement to challenge incumbent Najib Razak, who was mired in the billion-dollar 1MDB financial scandal.
Their alliance scored a historic victory against UMNO and Najib, who is now serving a 12-year jail term for corruption.
Mahathir became prime minister for the second time, with an agreement to hand over the premiership to Anwar later.

Anwar Ibrahim's 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 seats to form a government. Source: AAP / Fazry Ismail
"This is a long time coming for Anwar Ibrahim," Asrul Hadi Abdullah Sani, deputy managing director at strategic advisory firm Bower Group Asia, told AFP.
"One of his agendas is to ensure he is able to fulfil his reform agenda as he looks to stabilise a loosely cobbled federal coalition."