Mahathir Mohamad has been sworn in as Malaysian prime minister, despite efforts by the defeated incumbent Najib Razak to resist conceding and allegedly offering opposition candidates $6m to switch sides.

Despite the opposition gaining a historic win in the election, gaining a simple majority for the first time in 61 years, hours of uncertainty followed the result, with questions over whether Mahathir, a former prime minister who this year switched to the opposition party, would be allowed to return to power.

However, by late Thursday night, it was confirmed by the Palace that, after interviewing all leaders of the opposition parties, the King was finally willing to swear Mahathir into office. At 92, he becomes the oldest leader in the world.

Malaysia's former leader set to become world's oldest PM at 92 Read more

Mahathir said he would start on putting together a cabinet on Friday, which will be the first major test of the opposition coalition, Pakatan Harapan (PH), to prove the different parties in the alliance are capable of working together.

“We have a lot of work to do tomorrow,” Mahathir told a press conference following the ceremony at the Palace, adding that when it came to appointing government officials, “certain heads must fall”.

“We find that some people were aiding and abetting a prime minister who the world condemned as a kleptocrat,” he said. In a thinly-veiled dig at Najib, Mahathir also said he would also abolish the idea in the Malaysian government that “cash is king”.

Mahathir’s confirmation had faced post-election setbacks, with reports that the king- who is notoriously anti-Mahathir- was refusing to swear him in and that Najib was attempting to swing the election his way by buying up candidates in the state of Sabah.

There was also a suggestion that, according to the constitution, Mahathir was not even eligible to be prime minister because the opposition coalition is not technically one party.

The party that got the most seats was PKR, which is led by Wan Azizah, the wife of former rival Anwar Ibrahim, and there were reports she would be named prime minister instead.

However, speaking on Thursday morning Mahathir attempted to put all doubts to rest about whether he would be prime minister and said he would be forming a government by the evening with a majority of 122 seats out of 222.

Profile Mahathir Mohamad Show Hide Dr Mahathir Mohamad was Malaysia's longest-serving prime minister, holding office from 1981 to 2003. He is credited with overseeing a period of economic growth but was also notoriously authoritarian, cracking down on the opposition, the judiciary and the press. Mahathir selected Abdullah Badawi as his successor, but toppled him in 2009 after a poor election performance and installed another protege, Najib Razak, as prime minister. Having officially retired, Mahathir then denounced Najib in 2015, after the 1MDB scandal broke. In 2018, it was announced he had switched to the opposition party, and, at 92 years old, would be running again as prime minister to bring down Najib. If his win is confirmed, he will be the oldest leader in the world. Photograph: Lai Seng Sin/X03855

“Today I want to emphasise that our coalition, Pakatan Harapan, has already won a clear majority and therefore we are invited to form a government. We stand by the rule of law and whatever we do must be governed by the constitution.”

He said that according to the constitution “the prime minister should have the support of the majority of the candidates of parliament, it does not say it should have the support of any one party”, and emphasised that all parties in the coalition had signed a letter backing him as the choice for prime minister.

“We would like to form the government here, today, because currently there is no government of Malaysia,” said Mahathir. “We hope that at 5o’clock today we will have formed a government.”

Multiple reports from the ground in the state of Sabah suggested that on Thursday morning Najib and Barisan Nasional were still offering the candidates from the local Warisan party 20 million ringgit ($6m) to switch sides, though that would still not give them a parliamentary majority.

Mahathir, however, insisted that Warisan were fully backing the opposition coalition and dismissed the reports from Sabah.

Najib, who had been prime minister since 2009, made a speech on Thursday morning saying he accepted “the verdict delivered by the people”. However he did not admit defeat and instead highlighted that no party had achieved a simple majority.

“Because no party has gotten a simple majority, therefore the king will be making a decision as to who will be the prime minister,” said Najib.

With Mahathir now in power, Najib may also be facing the prospect of being investigated and prosecuted for his role in the 1MDB scandal, where $3.2bn of a Malaysian government fund was embezzled, with $681m allegedly ending up in Najib’s personal bank account and funded a multi-million dollar jewellery spree for his wife.

As prime minister Najib cleared himself of any wrongdoing, but Mahathir has repeatedly stated his belief that Najib was involved and pledged to see justice done.

Speaking on Thursday, he did not rule out prosecuting Najib. “I am not seeing revenge, we don’t want to punish people but the rule rule of law will be clearly implemented,” he said. “If Najib has done something wrong, then he will have to pay the price.”