Parliament passed the budget by a voice vote, leaving it unclear exactly how many of the 222 lawmakers supported the government's first budget since Muhyiddin emerged as the leader of a new coalition in March.

The government tabled the country's largest-ever budget three weeks ago, in a bid to bring the economy out of its first recession in over a decade and to manage the health fallout from COVID-19.

Following a spike in infections since September there has been a fourfold rise in the COVID-19 caseload to nearly 60,000.

The budget vote was the first real test for Muhyiddin's wafer thin majority, as he had avoided earlier opposition attempts to hold a confidence vote.

The ruling Perikatan Nasional coalition has been beset by infighting, and opposition leader Anwar Ibrahim has been impatient for a chance to test whether Muhyiddin still commanded support.

If the budget had been rejected by parliament it could have triggered a political crisis.

"I want to stress that the PN government is a government that is always open to accepting views, advice and criticism," Muhyiddin said in a statement after getting parliament's approval.

The Kuala Lumpur Stock Exchange gained 0.3% after the vote, while the ringgit strengthened by 0.2%.

Anwar said the opposition did not want to be seen as blocking a budget designed to benefit people such as frontline workers managing the pandemic, but said some specific measures would be opposed during committee stage debates.

"We will certainly choose to reject (budget provisions) and call for division (voting) when it is deemed necessary," he told a news conference in the parliament lobby.

Up until the budget vote, Muhyiddin had held a two-seat parliamentary majority but was buoyed by public approval for his early handling of the pandemic and support from the king, who in May upheld his appointment as premier and more recently decreed that all lawmakers back the budget.

But he has faced growing dissent in the United Malays National Organisation (UMNO), the largest bloc in his coalition. UMNO's support has appeared tenuous after former party leader and ex-premier Najib Razak attempted to broker conditional support for Anwar from among UMNO lawmakers.

Muhyiddin's credibility also took a blow late last month after King Al-Sultan Abdullah rejected his request to declare a state of emergency after a sharp spike in new coronavirus cases.

Parliament's approval of the budget has given Muhyiddin some breathing space, said Oh Ei Sun, a senior fellow with Singapore's Institute of International Affairs.

"He would likely get a political respite, as the opposition would likely not be able to muster a majority to topple him in the short term," Oh said.

(Reporting by Joseph Sipalan; additional reporting by Shruti Sonal; Editing by Martin Petty & Simon Cameron-Moore)

By Joseph Sipalan