Malaysian Prime Minister Mahathir Mohamad submitted his resignation in haste to the country's king on Monday and his political allies abandoned the ruling coalition, throwing the nation into new confusion and setting the stage for the possible creation of a new government.

The world's oldest leader at 94 years old, Mahathir relinquished his post after an attempt by his allies to bring down the government and stop the succession of leader-in-waiting Anwar Ibrahim.

The scuffle between old rivals Mahathir and the 72-year old Anwar marks the latest episode in the long-running political narrative between two of the nation's most influential political personalities.

Mahathir and Ibrahim partnered ahead of the election in 2018 to expel the UMNO-dominated Barisan Nasional alliance that had ruled Malaysia for 60 years, in a shock win that resulted in the ouster of then Prime Minister, Najib Razak.

The statement from Mahathir's office did not contain other specific information. His party, the Bersatu, announced it would continue to support Mahathir as Malaysia's prime minister. Another group of politicians under Ibrahim -- who is being groomed to replace Mahathir -- disclosed it was establishing an independent group of 11 public officials.

Ibrahim and Mahathir have a notoriously chaotic relationship but the two public figures reconciled since the 2018 elections, and Mahathir has repeatedly vowed to hand over power to his former nemesis.

The bid seemed to have died down by early Monday, however -- before Mahathir's office bared that he had issued resignation letter as Malaysian prime minister to the monarch at around 1 p.m.

The coalition's political wealth has been depleted with losses in five recent by-elections. Ibrahim also had a falling out with party mate, Mohamed Azmin Ali, the economic affairs official, who was one of the figures who attended the meeting Sunday night. Anwar's People's Justice Party announced the ouster of Azmin as a member early Monday.

For his part, Azmin declared that he has left Anwar's party, bringing along with him 10 renegade officers of PKR, which until Monday was the dominant partner of the ruling party.

Anwar had said early on Monday he had a "very good meeting" with Mahathir and was scheduled to meet the king at 2 p.m.

In a media briefing prior to attending a hastily-called meeting with the PJP, Mahathir said "I am touched by his stance to not bow down to a group who wants to usurp authority without creating an agenda of change."

While the monarch's role is at best ceremonial, he validates the appointment of the nation's prime minister and Anwar may persuade him that he has enough backing from MPs to establish a government, political analysts said.

The political turmoil could bring fresh economic turbulence to the Southeast Asian nation, and discourage businessmen from investing at a time when trade wars and weak global financial markets are dealing a heavy blow on the country.

Malaysia's stock index has already plunged over 20 percent from its peak in 2018, and is poised to tread into a bear market for the first time in more than a decade. The Malaysian ringgit dropped as much as 0.9 percent to 4.2271 per US dollar, the weakest since September.