Voters in Jakarta are choosing a governor in a run-off election that has been called “the dirtiest and most divisive” Indonesia has ever seen.
Polls suggest it is a close race between incumbent Basuki Tjahaja Purnama, a Christian of Chinese descent, and Anies Rasyid Baswedan, a Muslim.
Mr Purnama is also on trial for blasphemy, which he denies.
Security is tight amid heightened racial and religious tensions.
Hardline Islamist groups have accused Mr Purnama of insulting a Koranic verse during a campaign speech and have rallied large crowds against him.
Correspondents say this has made the election a choice between secularism and a growing hardline Islamist movement in Indonesia.
- How fake news and hoaxes have tried to derail the election
- Who is Jakarta’s non-Muslim governor?
- How checked shirts became a political symbol in Jakarta
How is the vote going?
BBC Indonesian editor Rebecca Henschke says that though extra security officers have been deployed to polling stations, the mood in Jakarta is not overly tense and there is still a festive atmosphere.
Mr Purnama, also popularly known as “Ahok”, voted with his family in north Jakarta early on Wednesday morning.
He told reporters: “Jakartans must use their voice as the future of Jakarta is in their hands. Don’t be afraid, the police are here providing security.”
A coalition of hardline Islamic groups supporting Mr Basedan previously said that it would send at least 100 activists to each polling station to monitor voting. But correspondents say they have a very limited presence so far.
Police have warned against voter intimidation.
Rizieq Shihab, leader of the Islamic Defenders Front which has been leading protests against Mr Purnama, has also cast his vote.
Asked by the BBC if his group was damaging Indonesia’s pluralist democracy, he said: “Democracy doesn’t stop someone from voting for a person from the same religion as you…. Christian vote for Christian, Muslims vote for Muslim.”
The election has also seen anti-Chinese sentiment, sparking unease in a country that has seen violence against its Chinese minority previously.
A number of Chinese Indonesians who turned up to vote told the BBC that they were not intimidated.
“Politics is cruel. There will be threats, physically or verbally. But I still feel comfortable even though I’m of Chinese descent…. So far they only scream out hatred but haven’t really acted on it,” one voter, Rudi Irmawan, told the BBC.
What is the controversy about?
Mr Purnama is the first Christian and minority ethnic Chinese leader of Jakarta in over 50 years.
He stepped into the role from the deputy post without election in 2014, when his predecessor, Mr Joko Widodo, became president.
Mr Purnama was accused last year of insulting a Koranic verse during a campaign speech, which he has denied, saying his comments were aimed at politicians “incorrectly” using the Koran against him.
Hardline Islamists have cited a verse from the Koran to support an argument that Muslims should not vote for a non-Muslim leader.
Correspondents say his rivals have also heavily capitalised on these allegations to harness the Muslim vote, with Mr Baswedan meeting the Islamic Defenders Front twice publically.
If convicted, he faces a maximum five-year jail sentence, although he could still govern while appeals are heard. His trial is due to resume on Thursday.
- The blasphemy case testing Indonesia’s very identity
- X-Men comic references Indonesian political controversy
How has it affected the outcome?
The controversy has clearly hurt Mr Purnama’s chances. Once considered the clear frontrunner, he won the first round of the election in February with only 43% of the vote, while Mr Baswedan had 40%.
The run-off is now taking place as Mr Purnama failed to win that first round by a sufficiently large margin.
The Jakarta Post has described the campaign as “the dirtiest, most polarising and most divisive the nation has ever seen”.
Indonesia is the world’s most-populous Muslim country. About 85% of its population are Muslim, but the country officially respects six religions.
Jakarta election: Tight security for divisive governor contest