Mahathir pledged as part of their agreement that he would eventually hand power to Anwar, but it took just a few months after the 2018 vote for their political marriage of convenience to begin looking shaky.
The murky political drama, which was playing out without much transparency on Monday, undercut what had been one of the region's more promising political transitions and harked back to a time when backdoor dealing and palace intrigue were the keys to Malaysia's levers of power.
"There are perceptions that this undermines the democratic process and undermines the kind of mandate that people put in to the new government," said Bridget Welsh, an honorary research associate at the University of Nottingham Malaysia's Asia Research Institute who has studied the country's politics. "There is a lot of disappointment among people who voted for the to see the government collapse as it has."
A statement from the prime minister's office said Mahathir submitted his resignation to Malaysia's king. Under Malaysia's constitution, the entire cabinet must be dissolved if the prime minister resigns.
At the same time, Mahathir's party, the Malaysian United Indigenous Party, known as Bersatu, said it would leave the ruling coalition. Mahathir also quit as the party's leader, and about a dozen other prominent lawmakers left to form an independent bloc in the legislature - paving the way for a complete reconfiguration of the Southeast Asian country's government.
Experts said the most remarkable characteristic of the upheaval is that all political blocs, the opposition and ruling coalition alike, are appealing for Mahathir to stay in power, giving him the opportunity to realign the political status quo and potentially sideline Anwar with a broad base of support.
"This will give maximum flexibility; he can start everything on a clean new slate," said James Chin, director of the Asia Institute Tasmania at the University of Tasmania. "He holds all the cards."
The king, Sultan Abdullah of Pahang, has not commented publicly on the matter. Analysts say that Abdullah could call for fresh national elections, declare a state of emergency, negotiate with Mahathir to form a new government if he has a majority of lawmakers behind him, or call for an emergency session of the legislature to resolve the issue.
Mahathir was slated to meet the king later Monday evening local time, as was Anwar, who indicated he would comment afterward. His spokesman did not respond immediately to a request for comment.
In landmark elections in May 2018, Malaysians ousted a long-serving coalition government whose leader, Najib Razak, was dogged by a multibillion-dollar corruption scandal. The vote ushered in a new coalition - Pakatan Harapan, or the Alliance of Hope - led by Mahathir and Anwar.
Mahathir had promised to cede power to his former rival during his term, but he remained vague on the timeline. Months after the vote, in an interview with The Washington Post, Anwar groused that Mahathir and his supporters were working on the sidelines to stymie his leadership prospects. Throughout the past year, Anwar had been working to assure Malaysians that the two were finally able to get along, posting pictures on social media of their meetings and saying that he believed Mahathir was sincere about handing over the reins.
But the behind-the-scenes hostilities exploded into full view over the weekend, when Anwar said Mahathir's party and "traitors" within his own party were plotting behind the scenes to effectively form a new government, and sideline him.
Malaysia's ruling coalition was especially celebrated for being able to draw together liberal parties and conservatives across racial and religious lines. Hopes were high that the bloc's electoral success could usher in a new era of inclusive politics, where minorities including ethnic Chinese would have more say in a political landscape long dominated by Malay Muslims.
On Monday, Lim Guan Eng, secretary general of the Democratic Action Party, which counts Chinese Malaysians among its core supporters, condemned those within his old alliance who "attempted to form a backdoor government to replace the existing democratically elected" government.
"Such political manipulation has affected the government's effort to address economic and livelihood of Malaysian businesses and the ordinary ," Lim said.
The DAP and the other two parties remaining in the ruling coalition have pledged their continued support for Mahathir. They said Monday that they will urge him to remain in power, citing his ability to fight corruption.
Within the changing fortunes of the country's politicians, Welsh said, is the issue of minority politics in Malaysia, where both politics and economics have long played out along racial lines.
"Will this new government be an inclusive one, or one based on racial primacy?" Welsh asked. "These are things at the core of this - yet, for the people who are involved in these elite deals, it is all about money and power and who is getting what positions."
Expert Cited