On Sunday, Muhyiddin Yassin was sworn in as Malaysia's eighth prime minister after a week of high political drama. His predecessor, Mahathir Mohamad, had resigned a few days before but was maneuvering to keep his job with a new parliamentary coalition, while Mahathir's party rival Anwar Ibrahim also wanted the top spot.
What surprised many was that none of the three was able to show the Malaysian King a clear majority among the country's 222 Member of Parliaments but he evidently felt Muhyiddin would be able to assemble it when parliament reconvened.
Last week's events were based on a gigantic gamble by Mahathir, an ultimately unsuccessful one. Now we need to consider why he lost, what the new prime minister will do and what this all means for Malaysia.
Mahathir has no one but himself to blame for his loss. By resigning and sparking what he hoped would be a formality before his reappointment, he created a vacancy where none had existed and put the position into play.
Moreover, he gave up his structural advantage. Many people outside Malaysia do not understand that the office of the prime minister there is nothing like in the U.K., despite Malaysia largely adopting the Westminster system of government.
The Malaysian prime minister is more akin to a medieval king with absolute power, granting citizenship, for example, and deep pockets for patronage. If Mahathir had not resigned, the office would have given him a distinct advantage against any potential challengers.
To some extent, the reasoning behind his fall will always be hidden. The Malaysian King cannot act alone: his position rotates between nine sultans, the Malay rulers, every five years, and although they are supposed to be above politics, in reality they have strong political opinions and can intervene behind the scenes.
With Muhyiddin as prime minister, what can we expect? First, I believe the new government will be overtly pro-Malay and pro-Islam, who make up almost 60% of the population, rather than for the Chinese and Indians, who are 30%. Malays already benefit from an extensive system of economic and other privileges.
In the three core parties of the new governing Perikatan Nasional (National Alliance) coalition -- United Malays National Organization, Parti Islam Malaysia and Malaysian United Indigenous Party -- there is not a single non-Muslim MP. There are some in the coalition's minor parties.
The common theme for the three parties is that they believe in Ketuanan Melayu (Malay supremacy), and Parti Islam Malaysia, or PAS, also believes in Islamic supremacy and turning Malaysia into an Islamic state.
Contrast this with Pakatan Harapan (Alliance of Hope), led by Mahathir and Anwar. More than half of the MPs from this coalition are non-Malays. While this is a strength in multiracial Malaysia, it is also a weakness among the Malay majority. Many in that community refused to support Pakatan Harapan precisely because it was multiracial and had significant non-Malay representation.
PAS's idea of turning Malaysia into an Islamic state is my first concern with the new government. It has introduced hudud (Islamic law) at the state level in Kelantan and Terengganu but cannot enforce it because it conflicts with Malaysia's federal constitution, the supreme law of the land.
Now that PAS is one of the troika in power, will it push the administration to amend the constitution? There is already talk that PAS will get the government to change the law to indirectly allow for the implementation of hudud.
I expect that PAS will insert Islam into every facet of public policy. While this is nothing new in Malaysia, PAS's version of Islam is markedly different from the previous regime's, much more conservative and based on compulsion.
This version is becoming more popular in Malaysia as years of official indoctrination have created a generation of Malays who are receptive to the idea that Malaysia can be a model Islamic state with Malay characteristics. Since there are so few non-Muslims in the ruling coalition, it is much easier for PAS to push for a stronger Islamic presence from now on.
My second concern is that UMNO offered its support to Muhyiddin on condition that he would halt the corruption charges against party leaders from its previous spell in government. Top of the list is UMNO President Zahid Hamidi, who has been charged with 47 counts of money laundering and corruption, all of which he has denied. Najib Razak, the former prime minister, is facing two separate trials for corruption, which he also denies.
While it is not possible to halt ongoing trials, there is every chance that any verdict can be reversed through the appeal courts.
On top of this, many ordinary Malaysians are worried that upcoming trials relating to the 1Malaysia Development Berhad scandals, during which billions were allegedly looted from state funds, may not proceed at all if a new attorney general decides against them.
If the transformation of Malaysia into an ethnically Malay-dominated state with a strong tilt to Islamic tenets seems far-fetched, consider nearby Brunei: it became a fully-fledged Malay Islamic state, complete with strict Sharia law, in 2014.
James Chin is Professor of Asian Studies, University of Tasmania.