Malaysia's king said on Tuesday he will pick the next prime minister, after the leading two contenders failed to win a majority in last weekend's election and his proposal for the two to work together was turned down.

The vote resulted in an unprecedented hung parliament, with neither opposition leader Anwar Ibrahim nor former premier Muhyiddin Yassin winning the simple majority needed to form a government.

To break the stalemate, King Al-Sultan Abdullah suggested the two rivals work together to form a 'unity government', Muhyiddin said, but added that he will not work with Anwar. Muhyiddin runs a Malay Muslim conservation alliance, while Anwar runs a multi-ethnic coalition.

The Saturday election and the ensuing turmoil prolongs political instability in the Southeast Asian nation, which has had three prime ministers in as many years, and risks delays to policy decisions needed to galvanise an economic recovery.

The king had given political parties until 2 p.m. (0600 GMT) on Tuesday to put together alliances needed for a majority.

But the candidates failed to do so after the incumbent Barisan Nasional coalition refused to align with either.

It is now up to the constitutional monarch, who plays a largely ceremonial role but can appoint whoever he believes will command a majority.

"Let me make a decision soon," the king told reporters outside the national palace.

He also asked Malaysians to accept any decision about the government formation.

The king later met with Anwar and Muhyiddin, and summoned lawmakers from the Barisan Nasional coalition for a meeting on Wednesday.

Anwar told reporters that the king, in their meeting, expressed his desire to form a strong government "that is more inclusive in terms of race, religion, or region" and one that can focus on the economy.

Anwar's progressive coalition won the most number of seats, but an Islamist party - which is part of Muhyiddin's bloc and has touted sharia law - made huge gains, raising fears in Malaysia -- which has significant ethnic Chinese and ethnic Indian minorities following other faiths.

Malaysian police cautioned the country's social media users to refrain from posting "provocative" content on race and religion after the divisive election.

The political uncertainty hit the Kuala Lumpur stock market , which fell for a second day on Tuesday. Election gains by the Islamist party added to investors' fears, notably over policies on gambling and alcohol consumption.

MINORITY GOVERNMENT?

Anwar's progressive coalition and Muhyiddin's conservative Malay Muslim alliance - which includes the Islamist party - have both said they have majority support, though they did not identify their backers.

Nik Ahmad Kamal Nik Mahmod, law lecturer at the International Islamic University of Malaysia, said a minority government could be formed or the king could ask to meet with lawmakers individually to hear their choices for prime minister.

"If a minority government is appointed, it is proper for the new government to table a vote of confidence when parliament reopens," he said.

Anwar's coalition won the most seats in the Saturday election with 82, while Muhyiddin's bloc won 73. They need 112 - a simple majority - to form a government.

Barisan won only 30 seats - its worst electoral performance - but was expected to play a pivotal role in deciding who forms the government as its support is needed for both Anwar and Muhyiddin to get to 112.

It is the decline of the once-dominant Barisan and its leading party, the United Malays National Organisation (UMNO), that has ushered in a new uncertain phase in Malaysia.

Barisan led every government since independence from British colonial rule in 1957 up until its first defeat in the 2018 election. It returned to power under Ismail in 2021 after the collapse of two coalition from infighting.

Corruption allegations, mostly related to the looting of billions of dollars from sovereign fund 1Malaysia Development Bhd (IMDB), for which former prime minister Najib Razak was jailed this year, seriously wounded UMNO's image. (Reporting by A. Ananthalakshmi, Rozanna Latiff and Mei Mei Chu; Writing by A. Ananthalakshmi; Editing by Gerry Doyle and Raissa Kasolowsky)