The so-called "quick count" of Wednesday's votes showed Jakarta's Christian Governor Basuki Tjajaka Purnama, better known as Ahok, didn't come close to winning after a campaign that had thrown everything at him.
"Don't be sad, God gave the power and God takes it," Ahok told his supporters on Wednesday evening.
"We all together want Jakarta to be better."
At a five-star hotel in the centre of the capital, his supporters gathered — many of them wept.
"I'm really sad because Ahok's losing means the loss of democracy," one woman told the ABC.
Ahok's supporters say the once widely popular Christian Governor's fall from grace came at the hands of trumped-up blasphemy charges against him.
Jakarta Governor Basuki "Ahok" Tjahaja Purnama waves towards the media on Wednesday evening.
Throughout the campaign he's been on trial for insulting Islam after comments he made about the Koran while arguing against the notion that Muslims should not vote for non-Muslim leaders.
The likely victor, Muslim Anies Baswedan has been known for his moderate approach to Islam, but undoubtedly courted the extreme Islamic vote during the campaign.
The one-time education and cultural minister's popularity appeared to improve after meeting Habib Rizieq, the head of the Islamic Defenders Front (FPI), who led mass demonstrations against the Christian Governor last year.
"Our commitment is to consistently maintain the pluralism of Jakarta," Mr Basweden, who'll be endorsed in October, told his supporters soon after learning of his success.
Jakartans will need to keep him to his word because — far from pluralism — the win has also served to embolden ultra conservative groups who want sharia law implemented across Indonesia, and Ahok jailed for the age-old, dated and draconian offence of blasphemy.
They've long argued that Muslims cannot be led by Christians, and now they have won.
Although the official figures won't be known for some weeks the quick counts, conducted by polling agencies, research companies and television stations, have historically proven accurate.
Election a 'proxy battle' for presidency
Supporters of Anies Baswedan react as the Muslim candidate led the count on Wednesday.
Habib Rizieq, the head of FPI that over decades has been known for hate crimes and violence, thanked God for the election result announcing his followers are ready if Ahok is not also jailed — a threat to stability once again.
Ahok, who was so popular he would likely have won the election in a landslide before the blasphemy charges were brought, is facing up to five years in jail.
If the five judges on the North Jakarta District Court rule against him, then it's clear that the moderate approach to Islam Indonesia is known for is being deeply tested.
The question is: What's President Joko Widodo going to do about it?
This election has been a proxy battle for the Presidential campaign due in 2019.
Unless moves are made to avert it, Islamic conservatism could play as big a role then.
Ahok had ambitions to become Indonesia's first Christian leader.
It appears the majority Muslim nation isn't quite ready for that.
Indonesian president Joko Widodo and his wife after casting their votes.
Three women voters celebrate Anies Baswedan's win.