Prime minister's move follows a weekend of political turmoil amid bid by his party to form new government without Anwar.
Malaysia's Prime Minister has also reportedly resigned from his party, Parti Pribumi Bersatu Malaysia [File: Lim Huey Teng [Reuters]
Malaysian Prime Minister Mahathir Mohamad has announced his resignation but was asked to stay on as interim leader by the country's monarch.
Mahathir said in a two-line statement that he had informed the country's king of his resignation at 1pm Kuala Lumpur time (05:00 GMT) on Monday.
Mahathir also reportedly resigned from his own party, Parti Pribumi Bersatu Malaysia, according to Reuters news agency, citing three sources. Mahathir's party also announced that it was quitting the ruling government coalition, Pakatan Harapan (Alliance of Hope), casting doubt on the future of the partnership.
Mahathir's decision follows a weekend of political wrangling, after it was reported on Sunday night that his party was planning to form a new government that would exclude his anointed successor, Anwar Ibrahim.
The king accepted Mahathir's resignation after meeting with him later on Monday, Chief Secretary Mohd Zuki Ali said in a statement.
"However, His Highness has given his assent to appoint Mahathir Mohamad as interim prime minister, while waiting for the appointment of the new prime minister. Hence until then, (Mahathir) will manage the country's affairs until a new prime minister and cabinet are appointed," Mohd Zuki said.
Anwar also said that Mahathir has no plans to join with anyone from the previous ruling coalition he defeated to try to form a new government.
When asked if Mahathir was responsible for the current political turmoil, Anwar blamed "those within my party and outside using his name."
"And he [Mahathir] reiterated what he had said to me earlier, he played no part in it. He made it very clear, that in no way would he work with those associated with the previous regime."