The Yang di-Pertuan Agong Sultan Abdullah Sultan Ahmad Shah has appointed Mahathir Mohamad as the interim prime minister.
The Malaysia king accepted the prime minister's resignation, but decided that Mahathir should continue to helm the nation until a new government is formed.
Earlier, Mahathir had an audience with the Agong at Istana Negara in Kuala Lumpur for 90 minutes.
Mahathir waved and smiled at media personnel gathered outside the gate when he left.
The interim prime minister post would be for a maximum of 10 days, a source told Malaysiakini.
Inspector-General of Police Abdul Hamid Bador said the king instructed the police to ensure peace and order in the country.
Hamid said: "I urge the people to not make any speculations."
"The democracy process is running smoothly. I also urge the political leaders and the people to be patient."
Mahathir still getting support
Constituent parties in the cratered Pakatan Harapan coalition have come out in support of Mahathir.
The biggest plot twist so far was the revelation by Anwar Ibrahim that Mahathir was not involved in the political coup, and that the shifting of political loyalties was the result of a treacherous plot by some members of his own PKR party.
Mahathir had resigned, Anwar said, to show that his name was being used.
Initially, the public perception was that Mahathir had tried to oust Anwar from power by denying him the chance to be the next prime minister of Malaysia.
Mahathir's appointment as interim prime minister means that Deputy Prime Minister Wan Azizah Wan Ismail -- wife of Anwar -- would not be Malaysia’s first woman prime minister, which was a possibility mooted earlier, according to a source privy to backdoor talks.
If you like what you read, follow us on Facebook, Instagram, Twitter and Telegram to get the latest updates.