(Corrects description of UMNO’s leadership in second paragraph.)

There is no glory in this victory. Malaysia’s ruling coalition, led by Prime Minister Najib Razak, held on to power in this week’s elections, winning 133 seats in parliament compared with the reformist opposition’s 89. Yet a closer look at the vote shows how fragile support truly is for Najib’s United Malays National Organization and argues for the winner to change direction.

UMNO, which has led Malaysia since independence in 1957, narrowly lost the popular vote. Its National Front coalition won a majority of seats in parliament largely by exploiting gerrymandered districts, which disadvantage cities, and by turning out its base of rural Malay voters, whom it has courted for decades with generous affirmative-action policies. (Opposition leader Anwar Ibrahim has also alleged rampant cheating, a claim that should be taken seriously.)

Chinese voters, who make up almost a quarter of the population and who wield economic clout well beyond their numbers, deserted the ruling coalition in droves; even urban Malays, fed up with a system of preferences, largely sided with the opposition.

Some economic signals are as troubling as the political ones. Malaysia’s economy has posted admirable gains over the past decade, growing at 5.6 percent last year. Yet cracks in the engine are beginning to appear. Facing declining Western demand for Malaysian-produced electronics, the country has grown more dependent on exports of commodities such as oil, palm oil and rubber. More dynamic neighbors are attracting investors, with even the Philippines, a perennial also-ran, mounting a competitive threat. A budget bloated by subsidies and household debt approaching 80 percent of gross domestic product have muted the customary applause from the International Monetary Fund.

So what’s next for Najib? By exposing widespread dissatisfaction, the election results present an opportunity for the prime minister. Having run on a reform platform of his own, he now has added incentive to make good on his pledges to address corruption and favoritism. Freeing up the state-owned press, lifting curbs on public demonstrations and increasing government transparency would generate goodwill and signal to both internal opponents and the markets that the reform impulse is genuine. (A post-election rally suggests the markets believe it is.)

Some members of the ruling coalition will argue that only continued handouts will preserve their Malay base. And Anwar and his People’s Alliance coalition could work to stymie the government and plunge the capital into gridlock. But if Najib begins to institute reforms, including providing a timetable for dismantling racial preferences, he can still lead Malaysia to better days. If he doesn’t, he is almost certain to lose next time.

To contact the Bloomberg View editorial board: view@bloomberg.net.