Malaysian Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after taking power.

The move came as parliament resumed after months of delay because of the coronavirus pandemic. Its success could thwart the opposition's bid of a no-confidence vote against Muhyiddin, analysts said.

More Images
Former Prime Minister Mahathir Mohamad, left, attend a session of the lower house of parliament in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Malaysian Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after taking power.

Prime Minister Muhyiddin Yassin attending parliament session at parliament lower house in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

“The vote suggests that Muhyiddin's government has the numbers to stay in power. Replacing the speaker is crucial because its the speaker who decides if a vote of no-confidence can go ahead," said James Chin, director of Asia Institute at University of Tasmania in Australia.

Malaysia parliament lower house speaker Mohamad Ariff Md Yusof, left, and deputy speaker Nga Kor Ming speaks to media after a vote on motions to appoint a new speaker during a parliament session in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

Then Prime Minister Mahathir Mohamad resigned in protest of the plan, and filed a motion of no-confidence against his former party ally.

Malaysia parliament lower house speaker Mohamad Ariff Md Yusof, speaks to media after a lower house vote on motions to appoint a new speaker during a parliament session in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

During the debate, ruling lawmakers said it was normal procedure to appoint new officers aligned with the new government. But Mahathir said the speaker should be someone who is neutral.

Malaysia's members of parliament attend a session of the lower house of parliament in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Malaysia's members of parliament attend a session of the lower house of parliament in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Malaysia's lower house parliament building is seen in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

Malaysia's lower house parliament building is seen in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

Lawmakers engaged in heated debates over Muhyiddin’s unprecedented proposal to replace the house speaker with his own candidate. Voting later showed the government secured 111 votes, against 109 for the opposition, with one absent and another unaccounted for.

Former Prime Minister Mahathir Mohamad, left, attend a session of the lower house of parliament in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Former Prime Minister Mahathir Mohamad, left, attend a session of the lower house of parliament in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

“The vote suggests that Muhyiddin's government has the numbers to stay in power. Replacing the speaker is crucial because its the speaker who decides if a vote of no-confidence can go ahead," said James Chin, director of Asia Institute at University of Tasmania in Australia.

“The vote also confirms what we know already, that is both sides are very close in terms of numbers and that Muhyiddin’s government is not stable," Chin said.

Muhyiddin’s legitimacy has been challenged by the opposition since he was sworn in March 1 after a weeklong political crisis. Muhyiddin pulled his ethnic Malay party out of the ruling alliance, triggering its collapse. He formed a Malay-centric government with the opposition, including the party of ex-Prime Minister Najib Razak, who is on trial on multiple graft charges.

Prime Minister Muhyiddin Yassin attending parliament session at parliament lower house in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Prime Minister Muhyiddin Yassin attending parliament session at parliament lower house in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Then Prime Minister Mahathir Mohamad resigned in protest of the plan, and filed a motion of no-confidence against his former party ally.

Chin said the speaker replacement suggested parliament cannot act as an effective check and balance against Muhyiddin.

“Given that the new speaker is nominated by Muhyiddin's government. I can bet that Mahathir will not to stand a chance in getting rid of Muhyiddin," Chin said. “Muhyiddin is now in a much stronger political position after this."

Malaysia parliament lower house speaker Mohamad Ariff Md Yusof, left, and deputy speaker Nga Kor Ming speaks to media after a vote on motions to appoint a new speaker during a parliament session in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

Malaysia parliament lower house speaker Mohamad Ariff Md Yusof, left, and deputy speaker Nga Kor Ming speaks to media after a vote on motions to appoint a new speaker during a parliament session in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

During the debate, ruling lawmakers said it was normal procedure to appoint new officers aligned with the new government. But Mahathir said the speaker should be someone who is neutral.

He said Muhyiddin's move was unconstitutional as a replacement can only be done if the speaker had died or the seat is vacant. The 95-year-old Mahathir, a two-time premier, was heckled by government lawmakers who said he shouldn't have resigned late February.

Mahathir earlier claimed he has majority support of lawmakers but that some have been bribed to switch sides. The opposition has also recently failed to agree on who their new prime minister candidate should be, with Mahathir pushing for a candidate from East Malaysia and his former alliance opting for Anwar Ibrahim, who was slated to succeed Mahathir previously.

Malaysia parliament lower house speaker Mohamad Ariff Md Yusof, speaks to media after a lower house vote on motions to appoint a new speaker during a parliament session in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

Malaysia parliament lower house speaker Mohamad Ariff Md Yusof, speaks to media after a lower house vote on motions to appoint a new speaker during a parliament session in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

Malaysia's members of parliament attend a session of the lower house of parliament in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Malaysia's members of parliament attend a session of the lower house of parliament in Kuala Lumpur, Malaysia, Monday, July 13, 2020. (AP PhotoVincent Thian)

Malaysia's lower house parliament building is seen in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)

Malaysia's lower house parliament building is seen in Kuala Lumpur, Malaysia, Monday, July 13, 2020. Malaysian new Prime Minister Muhyiddin Yassin narrowly won a motion to boot the parliament speaker Monday, scraping through the first test of his support nearly five months after he took power. (AP PhotoVincent Thian)