A former interior minister was sworn in as Malaysia’s prime minister on Sunday amid questions over his legitimacy and protests from the country’s former leader Mahathir Mohamad, 94, who lost a battle for power.

The appointment of Muhyiddin Yassin, who once described himself as “a Malay first” and who is backed by parties dominated by the country’s ethnic Malay Muslim majority, is likely to cause anxiety among minority communities.

Muhyiddin was named as prime minister after a week of political chaos in which the ruling coalition collapsed, alliances were reversed and rival camps rushed to forge backroom deals. Muhyiddin was named prime minister by the king, who the palace had earlier said would meet individually with all 222 MPs to find a way out of the crisis.

Mahathir, once the world’s oldest leader, described Muhyiddin’s appointment as illegal and said the palace has refused to hear him out. “We are going to see a man who does not have majority support become prime minister,” he said, calling for an urgent sitting of parliament.

Muhyiddin Yassin during his swearing-in ceremony at the National Palace in Kuala Lumpur on Sunday. Photograph: Maszuandi Adnan/EPA

Muhyiddin relies on support from Umno, a party mired in corruption scandals, as well as a fundamentalist Islamic party that backs strict Islamic laws. His appointment follows growing dissatisfaction among many in the Malay majority, who accused the previous ruling alliance of caving in to Chinese interests.

About 60% of Malaysia’s population are ethnic Malay Muslims, while the country also has large ethnic Chinese and Indian communities. In his previous decades in power Mahathir had prioritised Malay interests, but the coalition he formed with his more liberal rival Anwar Ibrahim in 2018 was unprecedented in its diversity. Muhyiddin’s government is expected to feature more Malays back in key positions and to be more religiously conservative.

Power struggles are likely to continue, however. Mahathir is seeking to move a motion of no confidence against Muhyiddin in parliament.

“For Mahathir, it’s not over. Mahathir as a politician has never left politics, even when he retired. The opposition is mobilising,” said Bridget Welsh, an honorary research fellow at the University of Nottingham Malaysia’s Asia research institute.

As prime minister, Muhyiddin has the power to dish out cabinet positions and so has an advantage in winning support from MPs. But his government remains fragile and he will face an uphill battle to prove his legitimacy as a leader, added Welsh. “He comes in with clouds over the process, and questions over whether he really had the numbers,” she said.

The political turmoil began on Monday when Mahathir unexpectedly resigned as prime minister, causing the government to implode.

His resignation followed moves by some in his party to break from the ruling alliance and form a new government. The coalition had long been fraught with tensions and involved an unlikely partnership between Mahathir and Anwar. Anwar was once jailed for sodomy charges under Mahathir but the two united before the 2018 election to oust the government of Najib Razak, which was entangled in the 1MDB graft saga – often referred to as the world’s biggest case of financial fraud.

Anwar was due to succeed Mahathir as prime minister, but Mahathir had refused to set a date for doing so and his supporters had sought to block a handover.

Just hours after stepping down on Monday, Mahathir was appointed by the king as interim prime minister, and appeared well placed to launch his own bid for power. But rival factions raced to prove to the king that they commanded enough support from MPs, and on Saturday Muhyiddin was named prime minister.

In a statement, the palace said the process of appointing a leader “cannot be delayed because the country needs a government for the wellbeing of the people and the nation”.

Some would welcome the appointment and hope simply for an end to the political upheaval, said Welsh, but she added that it would cause deep concern in other quarters.

“They have returned power to people who were kicked out. Ironically this has been done by someone who was sacked [from Umno] and now has come back to the fold,” she added.

Muhyiddin, 72, was a member of Umno for decades and was deputy prime minister in Najib’s government. Najib sacked him after he questioned the then prime minister’s handling of allegations surrounding the 1MDB scandal. With Muhyiddin reliant on support from the former regime, there are questions over whether those implicated in the saga will be held to account.