Before Anwar Ibrahim’s selection, the country had been contending with its first hung Parliament after Saturday’s election.
After days of political chaos, Malaysia has a new prime minister, its fifth in fewer than five years.
The country is now relying on a veteran politician to bring back political stability while leading a polarized electorate — split between one faction that sees itself as modern and multicultural, and another that is driven by a conservative Muslim base — into the post-pandemic world.
This is the task ahead for Anwar Ibrahim, 75, whom the king appointed prime minister on Thursday. It was the culmination of a stunning comeback for Mr. Anwar, whose career has included a stint as deputy prime minister, two jail terms that were considered politically motivated, and, finally, the role of longtime opposition leader.
The appointment ended a crisis that has engulfed Malaysia for almost a week: Saturday’s national elections, the first since 2018, led to the first hung Parliament in Malaysia’s history. None of the three main groups contesting the election won the simple majority needed to form the government in the 222-seat Parliament.
It was not immediately clear who Mr. Anwar’s multiethnic coalition, Pakatan Harapan (Alliance of Hope), was teaming up with to form a government.
The group had led Saturday’s election with 82 seats. In second place was Perikatan Nasional (National Alliance), whose success came largely because of one coalition member, the Malaysian Islamic Party, a conservative party that has called for theocratic Islamic rule in Malaysia. PAS, as the party is known, won 49 seats alone.
Barisan Nasional, the incumbent coalition that includes Mr. Anwar’s former party, the United Malays National Organization, was far behind, with 30. The election was seen as a final rebuke to UMNO, which has long been enmeshed in corruption allegations. Mr. Anwar had actively campaigned on the public’s desire for change from a UMNO government, vowing that he “will not bring with him the corrupt and greedy cultures which we had before.”
The final decision came down to the king, Sultan Abdullah Sultan Ahmad Shah. Malaysia is a parliamentary democracy with a constitutional monarchy, and the king has the prerogative to name the prime minister in the event of an inconclusive election.
For five days, the coalitions had been locked in closed-door negotiations among themselves and the king. On Thursday, the king met with rulers of the Malay states to resolve the crisis, and the palace issued a statement.
“The fact is, the people cannot be burdened by the political turmoil that has no end to it when the country needs a stable government that is able to flourish the economic landscape and development of the country,” the palace said.
Mr. Anwar will be sworn in at 5 p.m. on Thursday.
Liani MK contributed reporting.