IN ANY country, a leader who received deposits of nearly $700m in a personal bank account from an unnamed donor in the Middle East for unspecified purposes would find his position under scrutiny. Najib Razak, Malaysia’s prime minister, is no exception. Ahead of a general assembly starting on December 8th of his party, the United Malays National Organisation (UMNO), one of his predecessors, Mahathir Mohamad, published an open letter calling for the umpteenth time for his resignation. But the biggest risk facing Mr Najib at the assembly is the trivial embarrassment of a spot of booing and heckling; politically, he is unassailable. That may be good news for Mr Najib’s many friends abroad. What it says about Malaysian politics, however, is profoundly depressing.

Mr Najib has denied any wrongdoing in receiving the money, in 2013, or making any personal gain. Malaysia’s anti-corruption commission confirmed that the money had come from donors and was not, as had been alleged, siphoned off from a troubled state investment fund called 1MDB, whose advisory board Mr Najib chairs. So the prime minister does not face any serious legal threat. But in many countries, even tangential association with the kind of murky scandals surrounding 1MDB would have been enough to finish a politician’s career. Detailed stories of alleged impropriety at the fund have appeared in the international press. One recent twist involved allegations that a murdered public prosecutor, whose body had been found in a river in a cement-filled oil drum, had been investigating 1MDB. Mr Najib has shrugged off all the mudslinging as malicious innuendo spread by his political opponents. He earlier weathered another kerfuffle, over bribes allegedly paid when Malaysia bought French submarines during his time as defence minister in the early 2000s.

Apart from a few malcontents, most notably the nonagenarian Dr Mahathir, his party seems to be behind him. As Jahabar Sadiq, who runs a well-informed website, the Malaysian Insider, puts it, Mr Najib has “bested his master” (Dr Mahathir) and is “sailing on, as grandly as a gondola”. Dr Mahathir played a big role both in installing his immediate successor, Abdullah Badawi, and in replacing him with Mr Najib in 2009 after a disappointing election result the previous year. The next election, in 2013, went even worse for the coalition that UMNO heads: it lost the popular vote and only clung on to power thanks to gerrymandered constituencies. But Dr Mahathir’s dire warnings that UMNO faces doom at the next election, due in 2018, sound increasingly like the impotent rants of a cranky has-been.

This is in part a tribute to Mr Najib’s skill at playing politics the Malaysian way. The son of a former prime minister, he has spent a lifetime learning how to pull the levers of patronage and punishment. Many delegates at UMNO’s assembly will have personal reasons to feel thankful to him. And no obvious rival has emerged within UMNO. Of those conceivably in the frame, none seems likely to fare any better at the polls than Mr Najib. As for the opposition, it is in disarray. The leader of the coalition that won the most votes in 2013, Anwar Ibrahim, is in jail, on what many believe to be trumped-up charges of sodomy. Mr Anwar managed to bridge a coalition including a party appealing largely to the ethnic-Chinese minority (nearly a quarter of the population) and an Islamic party appealing to ethnic Malays. Without Mr Anwar’s unifying figure, that coalition has splintered, and its successor has a narrower appeal.

Mr Najib also seems to have learned from Dr Mahathir, who, facing political difficulties in 1987, locked up more than 100 critics under the colonial-era Internal Security Act. Mr Najib’s administration has repealed that act. However, it has made ample use of the similarly draconian Sedition Act to charge opposition politicians, journalists and critics of all sorts. One, a cartoonist known as Zunar, faces no fewer than nine sedition charges and a possible 43 years in prison. He is challenging the constitutionality of the act itself, but believes there is “no hope at all” of winning.

In Kuala Lumpur for the East Asia Summit last month, President Barack Obama could not entirely ignore the domestic criticism of Mr Najib. In private he reportedly called for Mr Anwar’s release, and perhaps was told that the judiciary is free from political interference. But Mr Obama was restrained. He and Mr Najib get on. They played golf in Hawaii last Christmas. Mr Najib is urbane, charming and plays up Malaysia’s strengths. It is a bastion of moderate Islam, an important ally against Islamist extremism. Thanks to Mr Najib, it agreed to the region’s American-led free-trade pact, the Trans-Pacific Partnership, which is unpopular in Malaysia. The prime minister also gets on well with China, one of whose state-owned firms helpfully agreed to buy some of 1MDB’s assets. And Malaysia had a successful year, just concluded, as chairman of the Association of South-East Asian Nations, and host of its various summits.

A dangerous course

So at home and abroad, many have reason to cheer Mr Najib’s ability to roll with the punches. And with the economy growing at about 5% a year, he can probably also survive a weakening currency and grumbles about rising prices. But angry critics point to the costs; they draw comparisons to Ferdinand Marcos’s Philippines (not least because Mr Najib also has a wife known for her love of shopping—Zunar depicts her with multiple posh handbags). They see three big risks: an erosion of the integrity of Malaysian institutions, from the judiciary to the central bank; a more frequent resort to repression to stifle criticism; and, perhaps most worrying, an ever-increasing role for race and religion in Malaysian politics. Mr Najib presents himself as both the defender of the Muslim-Malay majority, and as the best protection the Chinese and Indian minorities have against resentful and assertive Malay political dominance. He is adept at balancing acts.

Correction: Banyan's assertion in an earlier version that Malaysia "signed" the Trans-Pacific Partnership was inaccurate. Negotiations came to a successful conclusion in October. But, pending their various domestic ratification procedures, none of the 12 parties' leaders has signed it. Sorry.