The Malaysian ruling coalition led by Prime Minister Muhyiddin Yassin won by a narrow margin in the local Sabah state elections, which constituted his biggest political test since taking office about 7 months ago, and may strengthen his grip on power.

After a frenzied election campaign, a coalition of parties supporting the central government won 38 of the 73 seats in the local parliament, while the opposition won 32 and the rest of the seats were dispersed over the independent candidates.

Muhyiddin praised the victory in a televised speech, saying that it "shows that the people of Sabah trust all the candidates we present."

The result does not directly affect the balance of power at the national level, but it is an important test of Muhyiddin's popularity.

On the 18th of this month, Muhyiddin confirmed that early elections will be held in the country if the ruling coalition wins the Sabah state elections, according to a local news report.

It was possible that the prime minister's allies would review his support for him in the event that he had negative results, while observers believe that "Muhyiddin's problems have not ended, even though he passed the first major election test."

To add to his problems, the elections came just days after opposition leader Anwar Ibrahim launched an attempt to overthrow him, when he said that he had a parliamentary majority, and asked to meet the king in order to name him.

Malaysia has suffered from political turmoil since the collapse of the ruling coalition headed by Mahathir Mohamad. Muhyiddin seized power with the name of the king, without contesting elections, and the coalition he leads has only a slim majority in parliament.