WHEN the leader of the Malaysian opposition, Anwar Ibrahim, was acquitted by a high court judge last month on controversial charges of sodomy, supporters in the government of the reforming prime minister, Najib Razak, were able to claim it as something of a victory. It was proof, they said, that ministers no longer meddled in judicial decisions, as in the bad old days. They even claimed it as evidence of Mr Najib's wider programme to bring the country into a modern, liberal age.

And so the attorney-general's decision barely two weeks later to appeal against Mr Anwar's acquittal hardly looks good. Mr Anwar has always maintained that the sodomy charge was a smear that had been orchestrated by people from within Mr Najib's ruling party, the United Malays National Organisation (UMNO). The case had run for two years, which for many Malaysians was quite long enough. Mr Anwar's lawyer quickly derided the appeal as “a desperate act”.

The attorney-general's decision renews suspicions that nothing much has changed within UMNO, which refuses to stop hounding Mr Anwar and, despite Mr Najib's worthy intentions, wants few reforms to speak of. Resistance to Mr Najib's changes has become something of a leitmotif of his time in office, and it could cost him dear at the next general election, which is expected later this year.

Over the past two years this English-educated son of an earlier prime minister has positioned himself as a bold moderniser. Mr Najib has promised to repeal a myriad of repressive laws, some carried over from colonial times, and to usher Malaysia into a new era of “transparency, democracy and the rule of law”. He seems sincerely to believe that Malaysia's political settlement after independence in 1957 is anachronistic, because it uses wide-ranging affirmative actions to privilege the rights of the majority ethnic Malays over those of ethnic Chinese and Indians. It should, he says, be dismantled, slowly but surely.

As well as being right and proper, such reform makes political sense too. A younger generation of Malaysians resents the ethnic divisiveness practised by the ruling establishment and yearns for more political and social freedoms. It means that the centre ground of politics, on which the next general election will be fought, has shifted away from the politics of Malay supremacy.

The trouble is that though Mr Najib believes in change, much of his party clearly does not. UMNO was founded specifically to protect Malay privileges and has ruled Malaysia without interruption since independence. Mr Najib came to power in 2009 not through an electoral mandate for change, but in an internal coup. As a consequence, he lacks the clout and possibly the will to impose his agenda on UMNO. And the longer he postpones an election, the more his personal authority will ebb.

Reformists within the party are now frustrated, whereas others have defected to other parties. One, Mohamed Ariff Sabri Aziz, used to be chief of information in Mr Najib's own division, or constituency. He argues that Mr Najib “does not have the foot soldiers to bring his reformist slogans down to the ground. He has the right instincts, but he's running into a brick wall.” Most of the internal opposition to Mr Najib comes at the divisional level, where a belief in Malay privilege remains entrenched. Here are the people who have benefited most from the tenders and contracts traditionally doled out by UMNO ministers to friends and family. “These are the favoured lot, who grease the wheels of power”, a senior UMNO man says. “You have to dismantle all this, and so far Mr Najib has done nothing. He is not strong enough. He has tried very hard, but he has been pushed back by the conservatives in his party.”

The civil service is a problem too. Traditionally an important source of Malay patronage, it is dominated by those with a vested interest in hanging on to their perks and their standard of living. So even if the prime minister's office tries to push a reform through, the outcome is by no means assured.

Obstructionism from within the governing system to Mr Najib's reforms has become brazen. Take the Peaceful Assembly Bill, awaiting signing into law. This legislation, from the attorney-general's office, seems to go directly against much of Mr Najib's earlier declarations about the need for greater civic freedoms. To many, the bill, regulating the right to protest, seems to be even more restrictive than what went before. Najibistas in the cabinet claim that they fought back bravely, watering down some of the more draconian provisions. Nonetheless, the new law has come in for condemnation, including by UN human-rights people.

So much for the great reform programme. The pity of Mr Najib is that a well-intentioned man has reformed just enough to alienate his own party and too little to convince the centre ground. He may be courting electoral disaster.