Mahathir Mohamad has been sworn in as prime minister of Malaysia again after a shock election victory, 15 years after he stood down.
Supporters waved flags and cheered outside the Istana Negara palace in Kuala Lumpur as took the oath inside.
The man who governed for more than two decades has become, at the age of 92, the world’s oldest elected leader.
He came out of retirement and defected to the opposition to take on and beat former protege Najib Razak.
His historic win ousted the Barisan Nasional (BN) coalition, which has been in power since independence in 1957.
Mr Najib said earlier he would “accept the verdict of the people” but correspondents say a smooth transition to power is not a given after such a major political upheaval.
No single party within the coalition won a majority, so technically it fell to Malaysia’s king to decide who formed a government.
- What just happened?
- ‘The biggest mistake in my life’
- ‘There are two types of age’
How have people reacted?
Mr Mahathir said earlier his coalition would not seek revenge but would “restore the rule of law”.
He also announced a two-day public holiday, adding: “But there will be no holidays for the winners.”
The official results showed the opposition Pakatan Harapan – the Alliance of Hope – secured 113 of the 222 seats being contested, including some which have only ever been held by the government. BN took 79 seats.
Rising living costs and long-running allegations of corruption weighed heavily on many voters and saw them peel away from Mr Najib and his once unshakeable coalition.
“I feel that with this change we probably can see something better in the future,” Suva Selvan, a 48-year-old doctor, told AFP news agency.
“Our hope for the future is a better government, fair, free and united.”
- Country profile
You may also be interested in:
Oldest winger in town going strong at 95
Remarkable life of Japan’s centenarian doctor
How did Mahathir manage to win?
Mr Mahathir was prime minister, at the head of the BN coalition, for 22 years, from 1981 until he stepped down in 2003.
Under his leadership, Malaysia became one of the Asian tigers – the group of countries which saw their economies expand rapidly in the 1990s. But he was an authoritarian figure who used controversial security laws to lock up his political opponents.
Most infamously his deputy prime minister, Anwar Ibrahim, was sacked and accused of corruption and sodomy – and later jailed on the latter charge – when he called for economic and political reforms.
Mr Mahathir was also a mentor to Mr Najib, who became prime minister in 2008.
But Mr Najib has been dogged by corruption allegations. He has been accused of pocketing some $700m from the 1Malaysian Development Berhad, a state investment fund he set up.
He has vehemently denied all allegations and been cleared by Malaysian authorities but the fund is still being investigated by several countries. Mr Najib has been accused of stifling Malaysian investigations by removing key officials from their post.
- Tainted political aristocrat
Those allegations led to Mr Mahathir’s surprise defection in 2016 from BN to join the Pakatan Harapan, saying he was “embarrassed” to be associated “with a party that is seen as supporting corruption”.
Then in January, he said he would run for the leadership again.
But despite his historic win, uncertainty hangs over his tenure. Prior to his win, he intended to govern for two years before stepping down. He promised he would arrange a pardon for Anwar, clearing the way for him to be re-elected and take the top job.
‘Mountain of challenges’
Analysis: Jonathan Head, BBC South East Asia correspondent
This morning Malaysia has woken to an entirely new situation, the first transfer of power in its history, albeit to a very familiar leader. But there are huge unknowns. How willingly will BN, the coalition which has, in various forms, run the country since independence and embedded itself into all areas of governance, relinquish power?
How well will a disparate coalition, united largely by their desire to oust Najib Razak, work together in government? How smoothly will the plan to gain a pardon for imprisoned opposition leader Anwar Ibrahim, and then for Mr Mahathir to hand the premiership to him within two years, actually proceed? And how will they treat Mr Najib, and his high-spending wife, both accused of greed and corruption?
After all the jubilation over an impressive act of defiance by Malaysian voters, there is a mountain of challenges to face.