Najib Razak, Malaysia’s prime minister, will face a fight for his political life on Wednesday as the nation of 31 million decides at the polls between his scandal-tainted government and an opposition alliance led by Mahathir Mohamad, his one-time mentor and former authoritarian leader.

Mr Najib is widely expected to retain power, thanks to a first-past-the-post system that opponents charge is skewed in favour of his ruling Barisan Nasional coalition, and traditional support from rural areas.

However, the momentum throughout the short and bitter election campaign has been with the Pakatan Harapan – a united opposition front of former political enemies – who have launched an offensive over corruption allegations and the rising cost of living, and the prime minister may lose the popular vote.

An unconvincing victory could leave Mr Najib, 64, facing an internal leadership challenge from with his United Malays National Organisation (UMNO) party.

That would be a huge political upset for a leader who has weathered uproar over an international multi-billion dollar graft scandal that engulfed a state investment fund, 1MDB, that he set up.

The US justice department has been investigating allegations that billions were siphoned from the fund and laundered through foreign bank accounts. But the prime minister has consistently denied any wrongdoing and has been cleared of any offence by Malaysia’s attorney general.