Anwar IbrahimImage source, Getty Images

Image caption,

Anwar Ibrahim has been appointed to the job after days of uncertainty

By Yvette Tan & Jonathan Head, South East Asia correspondent

BBC News

Malaysia's veteran opposition leader Anwar Ibrahim has been named the country's new prime minister, after several days of post-election deadlock.

The new leader was appointed by King Sultan Abdullah, after elections over the weekend resulted in an unprecedented hung parliament.

Neither Mr Anwar nor ex-premier Muhyiddin Yassin had won the simple majority needed to form a government.

Mr Anwar will be sworn in by the king at 17:00 local time (09:00 GMT).

"After taking into the 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," said a statement released by the palace, according to news agency AFP.

Mr Anwar's Pakatan Harapan (PH) party, which won the biggest share of seats in Saturday's election, does not have enough seats on its own to form a government.

It is not immediately clear which party he will enter into a coalition with.

It took five days of intense negotiations to reach an agreement on a new government, during which time various combinations of parties and forms of alliances were discussed, and then rejected.

Many of the political leaders have personal and ideological differences which made it hard to find a workable majority.

But the 75-year-old's appointment marks the fulfilment of a decades-long quest to become the country's leader.

He first served as the country's deputy prime minister in the 1990s, and was widely expected to replace then-prime minister Mahathir Mohammad.

But he was brought down by not one but two sodomy convictions under Mr Mahathir - charges that Mr Anwar claims were politically motivated.

But as opposition to then prime minister Najib Razak grew over the huge 1MDB scandal, Mr Mahathir came out of retirement, reconciled with Mr Anwar, and together they helped inflict the first ever defeat of the ruling party in 2018, resulting in Mr Anwar being pardoned by the king.

But the deal they made, that Mr Mahathir, already in his 90s, would hand over the PM's job to Mr Anwar, fell through in 2020, and the top job slipped through his hands again.

Now he has reached his goal, but in very challenging conditions, with an economy clobbered by Covid, and a need to work together with some of his most bitter political rivals.

The appointment of a government led by Mr Anwar's reformist Pakatan Harapan will be greeted with some relief by non-Malay Malaysians.

The rival Perikatan Nasional is dominated by the conservative Islamist party PAS, which non-Malays feared would push for a more religious and less tolerant kind of government.

But Mr Anwar's goal of promoting a more pluralist, inclusive Malaysia will be difficult to advance, given all the other challenges the new government will face.