Anies Baswedan, an Islamic intellectual and former university rector, looks certain to become Jakarta's next governor based on Wednesday's early election results.
Baswedan unexpectedly surged past the ethnic-Chinese incumbent Basuki Tjahja Purnama - known popularly as "Ahok" - with an estimated 58 per cent of the votes in a second round runoff. In February's first round of voting, Purnama took 43 per cent of the vote.
Commentary on the campaign has focused on whether the result is evidence of the rise of "radical Islam", given that only six months ago the incumbent Purnama, a Christian, seemed to be coasting to a comfortable first-round win. When blasphemy charges were laid against Purnama at the end of last year over alleged comments about Islam, his support effectively collapsed.
But a closer reading of the situation reveals this election was far from a genuine civilian uprising against a "blasphemous" incumbent. Instead, it was the product of opposition figures' clever use of conservative fringe groups to accentuate Purnama's religion and race. The motivation for this was the richness of the prize on offer: the governorship is seen as the ideal launching pad for a grab at the presidency.
In October 2016, Purnama was in a strong position. He had the backing of the two largest parties in the national legislature and a close relationship with President Widodo, whom he replaced as governor in 2014. But when an edited version of an amateur video emerged in which he told people not to be "fooled" by clerics' claims that a Quranic verse forbids Muslims from having non-Muslim leaders, his popularity plummeted. This edited version gave the impression Purnama said the Quran itself was fooling voters.
The blasphemy charges were laid soon after a November demonstration devolved into late-night violence, and a further December demonstration saw well over half a million demonstrators worship en-masse at the National Monument. But behind the scenes, opportunistic elites were pulling the strings. Charter buses and an embarrassment of free food were instrumental in bringing large groups of people into Central Jakarta.
Later the tricks turned dirtier. Banners appeared in front of mosques threatening voters with denial of Islamic burial rites should they support Purnama. Netizens faced a deluge of fake news. A whisper campaign terrified residents, many of whom expected riots if Purnama emerged as the victor.
Some analysts have parsed polling data to suggest Purnama's Chinese heritage was in fact far more of a liability than his religion. This accords with data suggesting the number of citizens who believed Purnama to be guilty of blasphemy peaked shortly after the December demonstrations, fizzling out once the frenzy subsided.
Until now, Indonesian citizens have widely embraced democracy as part of their nation's political identity. Even more important has been elites' acceptance of transparent and peaceful elections as the machinery of political succession. Unlike in neighbouring countries, the military has not emerged as a force for upending the will of the voters.
Previously, dirty campaigns happened, but the vanquished always packed up and headed home once a decision was clear. Even revelations of the Constitutional Court selling decisions on contested local elections have failed to dent the overarching social compact in favour of democracy. Wednesday's election, however, raises serious questions about the elite's commitment to the democratic process.
Purnama's demise represents a departure from the entrenched political rules of the game. We should be less concerned about the rise of a monolithic conservative Islam in Indonesia, and instead regard Baswedan's win for what it says about the willingness of the powerful to win at any cost.
President Widodo will be worried looking ahead to the 2019 presidential election. Just as Widodo leveraged the dominant Jakarta media machine, when he was governor during 2012-2014, to establish himself as a candidate from his first day in the job, Baswedan will now fancy doing the same.
Widodo remains the favourite, but Baswedan's win raises the stakes, as Widodo would have been far more secure with an ally like Purnama: politically inert on the national scene because of his heritage, and busy running the capital.