The reformist leader has gone through many ups and downs. Here's how he reached the prime minister's office.
Anwar Ibrahim has been sworn in as Malaysia's new prime minister, becoming the country's 10th leader after decades of tumultuous political journey that saw him being ousted as deputy prime minister in the 1990s, sent to jail twice and repeatedly written off by rivals as an also-ran politician.
Anwar took his oath on Thursday before Malaysian King Al Sultan Abdullah Sultan Ahmad Shah, who named him to the post earlier in the day after winning the reluctant support of smaller political parties to form a "unity government".
A general election was held on Saturday, but the race resulted in a parliament with no majority, forcing the parties to negotiate while thrusting the country into days of political uncertainty.
Anwar's ascent to the premier's post is a second victory for his reformist bloc, which won the 2018 polls but lost power after only 22 months due to a power struggle.
Anwar’s multiethnic Pakatan Harapan (Alliance of Hope), led with 82 seats, short of the 112 needed for a majority in the parliament.
His rival candidate Muhyiddin Yassin’s right-leaning National Alliance won 73 seats. Within the alliance, Pan-Malaysian Islamic Party has emerged as the single biggest party with 49 seats.
Muhyiddin had served briefly as the country's eighth prime minister and was vying to return to power.
“Anwar’s political struggle is of a comparable level as (South Africa's) Nelson Mandela, as both went through many persecutions in the process of democratising their countries," said Ei Sun Oh with Singapore's Institute of International Affairs.
“It is hoped that with Anwar in charge, Malaysia could revert to a more open and inclusive society and economy that would hopefully restore its prestige on the world stage."
Firebrand youth leader
Anwar, 75, had been on the cusp of power twice.
A firebrand youth leader, Anwar founded a youth movement before he was recruited into the then-ruling United Malays National Organization (UMNO).
He enjoyed a meteoric rise to become deputy prime minister-cum-finance minister in the 1990s.
He was groomed to take over from then-Prime Minister Mahathir Mohamad but a bitter fallout over Malaysia’s response to the Asian economic crisis saw Anwar sacked in September 1998 and later jailed for six years.
But he became a symbol for his new People's Justice Party and its vows for reforms.
READ MORE: Malaysia election delivers hung parliament
Anwar was freed in 2004, a year after Mahathir stepped down as prime minister after 22 years in power.
But Anwar was imprisoned again in 2015 – in a case he said was aimed at crushing his alliance which was making gains against the UMNO-led government. Yet, he didn't give up.
From his prison cell, Anwar made up with Mahathir, who returned to politics as anger boiled over a multibillion-dollar scandal involving the 1MDB state investment fund.
Their reunion led to historic 2018 polls that saw the unthinkable ouster of the UMNO-led alliance, which had led Malaysia since its independence from Britain in 1957.
Mahathir became the world’s oldest leader at 92 after the victory. Anwar was pardoned shortly after and would have succeeded Mahathir, but infighting led to their government’s collapse just after 22 months.
With the country facing economic challenges and political divisions after years of uncertainty and a devastating COVID-19 pandemic, Anwar is about to write the next chapter of his long political story.
Opposition leader Anwar Ibrahim has been appointed as Malaysia's prime minister, ending days of political impasse in the Southeast Asian countryhttps://t.co/znCWtwM2uf— TRT World (@trtworld) November 24, 2022