Kuala Lumpur (AFP) - 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 -- which has not only propelled him into the corridors of power but also landed him inside a jail cell 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.
In the capital Kuala Lumpur, Anwar supporters were in celebratory mood.
"I got goosebumps, seriously," said 36-year-old Norhafitzah Ashruff Hassan."He fought hard to be given the chance to be PM.I hope he performs well and proves his worth."
"I cannot express in words the ecstatic feeling I have," said Muhammad Taufiq Zamri, a 37-year-old product manager."A sense of optimism now flows and I believe Anwar will lead the country forward."
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 112 required for a majority.
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.
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 his former protege, who was also expelled from their then party the United Malays National Organisation (UMNO), and charged with corruption and sodomy.
Anwar was sentenced to six years in jail for corruption in 1999, with an additional nine years added for the sodomy charge the following year, the two sentences to run consecutively.
As he claimed political persecution, street protests erupted and evolved into a movement 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.
He never fulfilled that pact, and their alliance collapsed after 22 months.
"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."
James Chin, a professor of Asian studies at the University of Tasmania, told AFP the announcement "will be welcomed internationally since Anwar is known as a Muslim democrat worldwide".
"His biggest challenge will be to lead Malaysia out of the economic malaise following the pandemic."