Mahathir Mohamad, 94, has dominated Malaysian politics for decades.
He was the country’s longest-serving prime minister, in office from 1981 to 2003. He was also its shortest-serving, having stepped out of retirement in 2018 to boot out a kleptocratic government, only to resign (briefly) this past week.
Now Malaysians are contemplating a future without Mr. Mahathir, who in a surprise move on Saturday was cast aside by the country’s constitutional monarch. He is to be replaced by Muhyiddin Yassin, a veteran politician aligned with the corruption-tainted alliance that Mr. Mahathir defeated just two years ago.
It was a dramatic cap to a week full of roller-coaster twists, hairpin turns and enough whiplash alliance reversals to leave political analysts dizzied.
On Monday, after his governing coalition, called the Alliance of Hope, collapsed under the weight of internal rivalries and ideological contradictions, Mr. Mahathir resigned, only to have the king name him as interim prime minister.
Then followed a series of political alignments, realignments and yet more realignments, with every half-day seeming to bring a new political reality.
By Saturday morning, it appeared that the remains of the Alliance of Hope, which Mr. Mahathir had cobbled together out of disparate political forces — including Malay nationalists, Chinese reformists and liberal Islamists — had coalesced around the nonagenarian ruler yet again.
But with horse-trading still continuing, the king announced on Saturday afternoon that he had met with the nation’s lawmakers and determined that the majority supported Mr. Muhyiddin’s candidacy for prime minister.
“I would like to express my thanks, thanks to Allah, that I have been given the appointment,” said Mr. Muhyiddin, 72. He is scheduled to be sworn in on Sunday morning.
Mr. Muhyiddin is a leader of the Malaysian United Indigenous Party, which Mr. Mahathir had helmed until less than a week ago. As the Alliance of Hope fractured, the Malay Indigenous Party stepped across the divide to partner with the United Malays National Organization, or U.M.N.O., the corruption-dogged party that had dominated Malaysian politics for decades.
Mr. Mahathir and Mr. Muhyiddin were both elders in U.M.N.O. but left the party as its leader, Najib Razak, then the prime minister, was accused of orchestrating the looting of billions of dollars from a state investment fund called 1MDB, short for 1Malaysia Development Berhad.
In elections in 2018, U.M.N.O. and its coalition, the National Front, were kicked out of power by Mr. Mahathir’s Alliance of Hope.
Mr. Najib is being tried on various corruption-related charges. He stands accused of one of the most brazen lootings of national assets by a modern-day leader.
On his Facebook page on Saturday evening, Mr. Najib posted a message of congratulations to Mr. Muhyiddin.
Now that forces aligned with Mr. Najib seem poised to return to power, reformists and whistle-blowers are running scared. So, too, are members of minority groups, such as the ethnic Chinese, who fear U.M.N.O.’s political partners, some of whom have publicly supported turning Malaysia into an Islamic state.
While Malaysia’s population is mostly Muslim Malay, the country also has sizable Chinese and Indian minorities.
Also cast aside in the machinations is Anwar Ibrahim, who has, on and off, been Mr. Mahathir’s presumptive successor, as well as his occasional rival, for decades. Until Saturday morning, Mr. Anwar, 72, had been the Alliance of Hope’s nominee for prime minister.
But with Mr. Mahathir’s chances considered more promising, Mr. Anwar gave up, yet again, on his ambitions to lead Malaysia.
“I will be taking a step back,” Mr. Anwar said in a statement on Saturday morning, “so that we can avoid the country being further dragged into this power struggle and into an old system which has been rejected by the people.”
By Saturday evening, members of Malaysia’s ruling elite were still rushing from meeting to meeting, furiously fielding phone calls and WhatsApp messages. On social media, plans for protests against the king’s decision were being circulated.
Though Mr. Muhyiddin’s swearing in as prime minister has a time and a place — 10:30 a.m. Sunday at the national palace — few were willing to count out Mr. Mahathir, even at 94, just yet.