KUALA LUMPUR - Malaysian Prime Minister Najib Razak's administration was rocked by claims he was involved in a campaign to plunder state investment fund 1MDB, slammed by the US as "kleptocracy at its worst".
But for voters saddled with rising living costs, there may have been economic reasons closer to home for the shock electoral result that wrenched 64-year-old from power.
The polls Wednesday delivered a decisive defeat to Najib, in a major political upheaval likely to reverberate deeply across the country's political landscape.
Malaysia's outgoing leader has not been seen since official results showed he had been defeated by the country's opposition, led by his 92-year-old former mentor Mahathir Mohamad.
And as the scale of the drubbing started to become clear reporters who had flocked to the headquarters of Najib's United Malays National Organisation (UMNO) were told to leave.
Najib, the son of a Malaysian founding father, presented himself as a reformer when he came to power in 2009.
He made limited changes such as replacing security laws widely criticised as stifling dissent, offering a glimmer of hope for the end to repressive tactics by the UMNO-dominated coalition which has led Malaysia for six decades.
But soon after winning a second term in 2013, 1Malaysia Development Berhad (1MDB), a fund launched by Najib to promote economic development, slid into a massive debt hole and allegations surfaced that money was missing.
The story exploded in 2015 when The Wall Street Journal published documents allegedly showing that the premier received $681 million in payments to his personal bank accounts.
Najib and 1MDB have consistently denied any wrongdoing.
Since then, there has been a steady drip of allegations. The US Department of Justice launched civil lawsuits seeking to seize $1.7 billion in assets allegedly bought with money looted from 1MDB, from real estate to artworks.
In a speech last year, US Attorney General Jeff Sessions criticised those allegedly involved in the scandal, adding: "This is kleptocracy at its worst." .
LOSING THE MALAY VOTE
As the controversy escalated, Najib lurched sharply to the right.
Opponents were arrested on various charges and critics were purged from government, while domestic investigations cleared him of wrongdoing.
His government lost the popular vote for the first time at the last elections in 2013.
But it was the return of veteran ex-premier Mahathir into frontline politics at the head the opposition, that finally signalled the end to Najib's rule.
Mahathir raised the stakes in the electoral battle against his former protege Najib, vowing to bring him to justice over 1MDB.
Analysts had widely predicted that Najib's Barisan Nasional (BN) coalition - which led Malaysia since independence from Britain in 1957 - would retain power.
That was partly thanks to claims that Najib's coalition had been manipulating the electoral system for years to tilt polls in their favour.
The 1MDB scandal may have grabbed international headlines, but in the rural heartlands of the Muslim Malays - who make up some 60 per cent of the multi-ethnic country's population - it is not the most important issue.
While the overall economic picture is improving, many voters in the countryside have struggled with inflated living costs.
Mahathir has succeeded in luring away Malays from Najib, chipping away at a support base that his government had nurtured with an official affirmative action programme and racially-charged rhetoric.
That saw the opposition make strong gains in long-time BN strongholds in the polls, including Sarawak state on Borneo island, and the state of Johor, the birthplace of UMNO.