IN A year thick with bad news, much of it about Islam, it is perhaps surprising that the world’s biggest Muslim-majority country should produce the most heartening piece of politics so far. Yet the announcement on July 22nd that Joko Widodo, universally known as Jokowi, had won Indonesia’s general election is just that.

Above all, this is a triumph for democracy, albeit a somewhat messy one. In a country which was run by the Suharto dictatorship 16 years ago, the election marks the first time that one popularly elected leader, Susilo Bambang Yudhoyono, makes way for another. Democratic transitions in Asia do not always go smoothly—think of Burma in 1990 or Thailand’s recurring dramas. Indonesia’s is still not wholly secure. The runner-up, Prabowo Subianto, a volatile former general and son-in-law of the late dictator, has claimed large-scale fraud and is leaning on the Constitutional Court to annul the result (see article). But given the six percentage-point margin of Jokowi’s victory, Mr Prabowo is unlikely to get far.

Indonesia’s populist victor is a more wholesome figure than Thaksin Shinawatra, the Thai businessman whose ability to win elections has irritated that country’s ruling class. Jokowi has emerged not from the cronyism of Indonesia’s political and business elites, but out of the reformasi movement that toppled Suharto. He built a furniture business before rising, through popular elections, to the post of mayor of the mid-sized town of Solo in central Java and then, in 2012, to governor of the sprawling capital, Jakarta. In that job, he asked people what they wanted, got to grips with the capital’s appalling traffic and lessened the impact of the annual monsoon floods. Indonesia’s lofty politicians rarely stoop to solving such dreary problems or allowing voters to speak to them.

Jokowi’s reputation for running a clean government and getting things done spread fast, and propelled him on to the national stage. He had some help from the old guard, hitching his wagon to the party of Megawati Sukarnoputri, daughter of the country’s independence leader, for the presidential race. But Indonesia’s decentralised democracy can take much of the credit for his ascent from mayor to president. As befits a jumble of ethnicities and faiths strung out over 13,500 or so islands, Indonesia has devolved much authority to local government, out of which Jokowi emerged.

Jokowi’s strength is that he is an outsider. He represents no particular group. That is why his calls for reconciliation after a bitter election sound genuine. In a post-results speech that was as generous as Mr Prabowo’s was mean, Jokowi acknowledged that the close-fought campaign has divided families, neighbours and friends. It was time, he said, for Indonesia to unite again.

Reconciliation, yes; bringing everyone into the tent, no

The call is welcome. But Indonesian politics is too heavily coloured by consensus, and Jokowi’s own governing style is soft-edged. To form a parliamentary majority, Jokowi needs a broad coalition, as did Mr Yudhoyono before him. For the outgoing president, that too often led to policy paralysis and graft. Jokowi must not let consensus trump leadership.

More than anything else, that means tackling corruption. He should start by filling his cabinet with capable technocrats not party hacks. He must sack corrupt or incompetent bureaucrats and judges. And he must overhaul the venal courts. Only then will he be able to start to sort out the rest: weak government finances, rotten infrastructure, poor education and a ravaged environment. For all his promise Jokowi has much to do before he can be deemed a truly transformational leader.