ON MAY 9TH about 15m Malaysians will head to the polls. They will elect representatives to the 222-seat national parliament and to assemblies in 12 of the country’s 13 states. About 65% of the seats are thought to be competitive, up from 50% in the last election in 2013. In most ways the task facing Najib Razak, the incumbent prime minister, looks harder this time round. He faces a fearsome opponent in the shape of Mahathir Mohamad. The 92-year-old once ran Malaysia himself at the head of the party which has governed the country for more than six decades: the United Malays National Organisation (UMNO). UMNO is part of Mr Najib’s ruling coaltion, Barisan Nasional (BN). Dr Mahathir now leads the opposition coalition, Pakatan Harapan (PH). The contest is set to be extremely close.

To win, the government will need to reverse a trend of declining support. A decade ago BN lost its two-thirds majority in parliament and in 2013 it lost the popular vote too. Racial politics will help determine the outcome. About 69% of the population are either Malay or members of other indigenous groups, collectively called bumiputera. Another 24% are ethnic Chinese and 7% Indian. The bumiputera tend to support UMNO because of a system of racial preferences the party created in the 1970s. They still benefit from subsidies, scholarships and other perks introduced originally as temporary measures to boost the fortunes of a relatively disadvantaged group. Prolonging such handouts wins votes: at the last election 64% of Malays voted for UMNO. At the same time almost 80% of ethnic-Chinese supported the opposition.

Many Malays, it seems, care more about maintaining their perks than about any other issue. Since the last election journalists have revealed that $4.5bn disappeared from a state development fund and that a sum of almost $700m entered Mr Najib’s personal bank account. Mr Najib denies any wrongdoing, saying the money was a gift, eventually returned, from an unnamed Saudi royal. Despite the opposition’s ranting about the scandal, more mundane economic concerns are proving more important to voters. Housing expenses, fuel prices, creeping inflation through much of last year and an unpopular goods-and-services tax of 6%, introduced since the last election, all irk them.

Predicting whether PH or BN will triumph is extremely difficult. Dealmaking abounds. UMNO is cosying up to an Islamist party, which for decades had spurned it as godless, in order to try and split the opposition votes in 158 seats. The redrawing of electoral boundaries to favour UMNO candidates and the imposition of bureaucratic obstacles related both to parties’ registrations and candidates’ eligibility to run all burden PH. Dr Mahathir hopes that a huge turnout—higher than the 80% recorded in 2013—will tip the election in the opposition’s favour. (He has support among Malays who associate him with the UMNO of yore and its fight to preserve their handouts.) But he fears that his side will be up against the “dirtiest” vote in Malaysia’s history.