An alliance of opposition parties spearheaded by Mahathir Mohamad has won Malaysia's general election, setting the veteran strongman on course for a return to the Prime Minister's Office he occupied for 22 years.
Mahathir's stunning defeat of the coalition that has ruled the Southeast Asian country since independence from Britain six decades ago means that, at the age of 92, he will become the oldest elected leader in the world.
Official results on Thursday morning showed that Mahathir's Pakatan Harapan (Alliance of Hope) had won 112 of parliament's 222 seats, clinching the simple majority required to rule.
Najib's ruling coalition, Barisan Nasional (BN), had 79.
Two more seats remained to be announced.
Mahathir told a news conference he expected to be sworn in as prime minister later on Thursday.
"The time for change has come, and I hope the people in power realise this," said Asifa Hanifah, a young woman who joined thousands of opposition supporters in central Kuala Lumpur who waved flags, cheered and honked car horns.
Few had expected Mahathir to prevail against a coalition that has long relied on the support of the country's ethnic-Malay majority.
However, he joined hands with his one-time protege, the jailed politician Anwar Ibrahim, and together their alliance exploited public disenchantment over the cost of living and a multibillion-dollar scandal that has dogged Najib since 2015.
Mahathir has promised to seek a royal pardon for Anwar if they win the election and, once Anwar is free, to step aside and let him become prime minister.
Several key roads in the heart of the capital, where violence between races has played out in the past, were blocked off by police as evidence grew that Najib's coalition was on the back foot. In a statement, the police appealed for calm and said that for now the situation was under control.
The United Malays National Organisation (UMNO) party postponed an evening news conference and said Najib, who has ruled the country for nearly 10 years, would address the media later on Thursday.
The reverse for UMNO, the dominant partner in BN, takes Malaysia into uncharted political terrain, said Keith Leong, head of research at the KRA Group consultancy.
"We are witnessing history being made in this country," he said.
Mahathir is a polarising figure and many voters are suspicious of him because of his iron-fist rule as prime minister from 1981 to 2003.
But 64-year-old Najib's popularity dropped sharply over the past three years, partly due to a scandal over 1Malaysia Development Berhad (1MDB), a state fund from which billions of dollars were allegedly siphoned off.
Mahathir was once Najib's mentor, but he left UMNO over the 1MDB affair and joined the opposition.