Jakarta's Christian governor who is standing trial for blasphemy fought to cling on to his job Wednesday in a high-stakes election seen as a test of religious tolerance in Muslim-majority Indonesia.
Basuki Tjahaja Purnama faces two prominent Muslim challengers in the race to lead the teeming capital of 10 million, as local elections take place around the country.
But the stakes in the Jakarta vote have been raised by allegations that Purnama - the city's first non-Muslim governor for half a century and its first ethnic Chinese leader - insulted the Koran.
The claims drew hundreds of thousands of conservative Muslims onto the streets of Jakarta in major protests last year, and Purnama has been put on trial in a case criticised as unfair and politically motivated.
He has not been barred from running but his lead in opinion polls was dented for a period, and the vote is now seen as a test of whether pluralism and a tolerant brand of Islam in the world's most populous Muslim-majority country are being eroded.
President Joko Widodo, whose party supports Purnama, appealed for unity after a dirty election campaign that has been dominated by religious and ethnic tensions and a flood of "fake news" stories.
"Don't let our different political choices divide us - let's maintain our unity," he said after voting.
Casting his ballot, Purnama, who has won popularity among the middle-class with his determination to clean up the capital, hinted at the importance of the election: "Your vote decides the future of Jakarta."
Polls opened at 7:00 am (0000 GMT) for Jakarta's 7.1 million registered voters and were due to close at 1:00 pm (0600 GMT).
An early vote tally released in the afternoon should give an indication of how the candidates have performed although official results will not be announced until mid-March.
None of the three candidates, who also include a former education minister and the scion of a political dynasty, are likely to win outright in the first round, meaning the race will likely go to a run-off in April.
If Purnama 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.
He has been leading in recent polls but analysts believe he would lose in a second round.
'Fake news' flood
Authorities were not taking any chances after the tense campaign, with thousands of security forces deployed around the capital 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.
Renno Krisna, a 34-year-old music teacher who is a Muslim, said he had voted for Purnama, known by his nickname Ahok, as life had got better in Jakarta during his time in office, but lamented the tensions around the vote.
"Dirty politics has left our society divided - it's such a shame," he told AFP.
The governor's opponents are ex-education minister Anies Baswedan, who has jumped into second place in recent weeks by courting disillusioned Muslim voters, and Agus Yudhoyono, the son of a former president.
About 100 other local elections will take place on Wednesday but the race in the capital is the most hotly contested, 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.
The controversy is a high-profile example of the religious intolerance that has become more common in Indonesia, where 90 percent of its 255 million inhabitants are Muslim, with a surge of attacks on minorities in recent years.
Purnama won popularity for trying to improve traffic-choked, chaotic Jakarta by cleaning up rivers and demolishing red-light districts, although his combative style and controversial slum clearances sparked some opposition.