Surveys have shown the race tightening to a statistical dead heat, with incumbent Governor Basuki Tjahaja Purnama, an ethnic Chinese Christian, closing in on rival Anies Baswedan, a former education minister.
Purnama is standing trial on blasphemy charges stemming from the divisive campaign that also featured mass rallies led by Islamist hardliners and alleged plots to overthrow President Joko Widodo, who is popularly known as Jokowi.
The Jakarta election is viewed as a larger choice ahead of a 2019 presidential poll between the secular policies Indonesia has practiced since its post-World War II independence and a hardline political Islam that has strengthened in recent years.
"This is a test case for Indonesian pluralism, if it can withstand the pressure of the religious groups, the populists," said Wimar Witoelar, a political analyst and an adviser to former Indonesian president Abdurrahman Wahid.
"Indonesia is at a crossroads, and I mean Indonesia, not just Jakarta."
A survey conducted April 12-14 by polling firm Indikator showed Anies with 48.2% support versus 47.4% for Purnama, with 4.4% undecided.
Worries about backlash
The business community is worried about a possible violent backlash from the losing side in the election, which could affect the investment climate and endanger Widodo's fit-and-start economic reforms.
Southeast Asia's biggest economy grew 5.2% in 2016 and the government expects a repeat of that this year. Indonesian stocks are up 12.6% on the year, making the Jakarta market one of Asia's best performers.
Kartika Wirjoatmodjo, chief executive officer of the country's largest state bank, Bank Mandiri, said in an interview that whoever won "we (should) make sure it doesn't affect any of the long-term policies, especially on the openness and ... ease of doing business and attracting investment."
Purnama, who replaced Widodo in 2014 as Jakarta governor after serving as his deputy, saw his popularity soar as he tackled decrepit infrastructure, chronic flooding and endemic corruption in the traffic-clogged city of over 10 million.
His support plunged after an edited video circulated last September suggesting Purnama had mocked a verse in the Koran used by his opponents to argue Muslims should not vote for a person holding different religious beliefs.
Amid two rallies last year that drew hundreds of thousands of protesters, Purnama was charged with blasphemy, forcing him to make regular appearances in court during the campaign.
The hardline Islamists behind the rallies - led by the Islamic Defenders Front (FPI), a group known for attacks on religious minorities and extorting money from nightclubs - were cultivated by Purnama's rivals. Baswedan was accused of betraying his moderate Islamic roots when he met and sang with FPI leader Habib Rizieq, who was twice imprisoned for inciting violence in 2003 and 2008.
Purnama recovered to win the first round on February 15 with 43% of the vote, compared to 40% for Baswedan and 17% for Agus Yudhoyono, son of former president Susilo Bambang Yudhoyono, who drew support from conservative Muslims.
The FPI was among groups circulating hoax news stories on social media during the campaign of a pending invasion of Chinese workers and Chinese plots to decimate Indonesia's crops with contaminated chili
The FPI has vowed to stage further protests and a "revolution" if Purnama wins, according to flyers circulated by the group.
A senior government official said a victory for Purnama could reignite religious tensions and China-baiting at a time when the government is chasing Chinese investment for much-needed infrastructure.
"I worry that if a sizeable portion of the electorate feels cheated there could be a very serious backlash," said the official, who asked for anonymity to speak freely about the political climate in Indonesia.
However, political analyst Tobias Basuki also saw risks for the national government and its reform agenda if Baswedan won, given plans by his political patron Prabowo Subianto to challenge Widodo in the 2019 presidential poll.
Baswedan was Widodo's campaign manager in the 2014 presidential election, when he beat Subianto. But Widodo sacked him as education minister last year.
"Anies and Prabowo controlling Jakarta would impede Jokowi every step of the way," Basuki said.