Jakarta's Christian governor will fight to cling on to his job at polls this week despite standing trial for blasphemy, in a saga that has fuelled concerns about religious intolerance in the Muslim-majority nation.
Basuki Tjahaja Purnama will Wednesday face two prominent Muslim candidates in the race to lead the Indonesian capital, a megacity of 10 million, as local elections take place across the country.
But the Jakarta ballot has become about much more than whether the city's first non-Muslim governor for half a century, and its first ever ethnic Chinese leader, will continue in his job.
The run-up has been overshadowed by anger at claims Purnama insulted the Koran, that sparked huge protests by Islamic hardliners and led to the governor being put on trial in a case criticised as unfair and politically motivated.
Purnama has not been barred from running but his lead in opinion polls has shrunk, and the vote is now seen as a test of whether much vaunted pluralism and a tolerant brand of Islam in the world's most populous Muslim-majority country are being eroded.
"This is going to be a litmus test of Indonesian Islam — are we tolerant or intolerant?" said Tobias Basuki, a political analyst from Jakarta think-tank the Centre for Strategic and International Studies.
Although Muslims dominate Indonesian politics, Christian and ethnic Chinese politicians have risen to become government ministers, but very few have been both Chinese and Christian, like Purnama.
Religious and ethnic tensions have made for a dirty race with "fake news" flooding social media, and 27,000 security forces will be deployed in Jakarta on election day.
The "fake news" has mainly targeted Purnama, and included claims that a free vaccination programme he backed was a bid to make girls infertile and reduce the population. His supporters have hit back online, defending his record in office.
Tensions were still running high days before the vote, with tens of thousands descending on Jakarta's national mosque on Saturday to urge voters to back a Muslim.
The election for the governorship of Jakarta has been overshadowed by anger at claims the incumbent Basuki Tjahaja Purnama insulted the Koran. Purnama has won fans with his regeneration of parts of the city but he has also met opposition to slum clearance programmes (Photo by Goh Chai Hin / AFP).
"I am here driven by my faith, because I also felt insulted when Ahok insulted my religion," 25-year-old Mohamad Ramzie told AFP, referring to Purnama by his nickname.
The governor's opponents are Agus Yudhoyono, the son of a former president, and ex-education minister Anies Baswedan, backed by former general Prabowo Subianto who heads a powerful political party and ran against President Joko Widodo in 2014.
About 100 other local elections will take place on Wednesday but the stakes are highest in the capital, with the top job in Jakarta seen as a stepping stone to victory in the 2019 presidential polls.
Purnama's troubles began in September when he said in a speech that his rivals were tricking people into voting against him using a Koranic verse, which some interpret as meaning Muslims should only choose Muslim leaders.
An edited video of his comments went viral online, sparking widespread public anger. The controversy is a high-profile example of the religious intolerance that has become more common in Indonesia in recent years, with a surge of attacks on minorities as hardliners battle for influence.
About 90 percent of Indonesia's 255 million inhabitants are Muslim but most practise a moderate form of Islam and have lived largely harmoniously alongside Christian, Buddhist and Hindu minorities.
Purnama won popularity in Jakarta for making serious efforts to improve the overcrowded and chaotic city. The leader has cleaned up the once-filthy rivers, demolished red-light districts, and created more green spaces, although he has sparked some opposition with controversial slum clearances.
His support slipped after the blasphemy controversy erupted but has bounced back and most recent polls show him in the lead, although if the vote goes to a run-off in April he is seen as likely to lose. His trial is not expected to finish until at least April.
If he does win the vote and is convicted of blasphemy, which could see him sentenced to up to five years in prison, he would not automatically be barred from holding office and could avoid jail for a long time by filing successive appeals, analysts say.
Despite the challenges facing him, many of Jakarta's 7.1 million voters — most of them Muslims — see Purnama as the only hope for the city.
"There's a very simple reason why I'm voting Ahok," Eleonora Natasya, a 21-year-old engineering student, told AFP. "I actually see something changing when he is in charge."