Unofficial results show the minority Christian governor of the Indonesian capital was resoundingly defeated today

Unofficial results showed the minority Christian governor of the Indonesian capital was resoundingly defeated today by his Muslim challenger, after a campaign that cracked open religious and racial divides in the world’s most populous Muslim nation.

So called “quick counts” by 10 research companies show former Cabinet minister Anies Baswedan winning between 55 and 60 percent of votes with more than 80 percent of ballots counted.

Incumbent Governor Basuki “Ahok” Tjahaja Purnama is on trial for blasphemy and hundreds of thousands protested against him in Jakarta, deriding his Chinese ancestry and calling for him to be imprisoned or killed.

Baswedan, highly educated and with a moderate Muslim background, capitalised on the backlash against Ahok by courting the support of conservative clerics and figures on the radical fringe who opposed electing a non-Muslim.

The polarising campaign gave hard-line Islamic groups a national stage and has undermined Indonesia’s reputation for practicing a moderate form of Islam.

Ahok’s defeat is a setback for his political patron, President Joko “Jokowi” Widodo, who on Thursday hosts Vice President Mike Pence on the Indonesian leg of an Asian tour.

Ahok’s rival Baswedan was supported by the political and business elite that Jokowi unexpectedly bested in the 2014 presidential election and who will be seeking to unseat him in 2019.

Baswedan told reporters that he is committed to maintaining the diversity of Jakarta and will emphasise social justice.

Ahok, who was Jakarta’s first ethnic Chinese governor and first Christian in half a century, has been popular with middle-class Jakartans for his efforts to stamp out corruption and make the overflowing polluted capital more livable.

But his brash manner and evictions of slum communities alienated many in the city of 10 million.

Opponents seized their moment last year when a video surfaced of Ahok telling voters they were being deceived if they believed a specific verse in the Quran prohibited Muslims from electing a non-Muslim as leader.

Hard-line groups drew huge crowds to protests in Jakarta, shaking Jokowi’s centrist government.

On Thursday, prosecutors will make their sentencing demand in Ahok’s trial. Blasphemy is a criminal offence in Indonesia and punishable by up to five years in prison.

Opinion polls released earlier in the week seriously miscalled the outcome of Wednesday’s vote, showing Baswedan and Ahok neck-and-neck.

In the west Jakarta neighbourhood of Kebon Jeruk, Annisa Karolina, a 29-year-old restaurant cashier, said voting for a non-Muslim would be a sin, but she also believes Jakarta will be better run without Ahok.

A couple standing near her at the polling booth nodded in agreement. “Yes, we need a new governor, a well-mannered Muslim governor who isn’t pro-tycoons and businessmen, but who is also helping the poor,” one of them, Faturrachman, said.

More than 7 million people were eligible to vote and thousands of police and military personnel were deployed to secure the 13,000-plus polling places.