The race to become governor of Indonesia's capital was heading for a second round between the incumbent Christian and a Muslim former education minister after neither appeared to win a majority in a Wednesday election.
The Jakarta poll has been overshadowed by religious tensions, with Islamist-led protests against Governor Basuki Tjahaja Purnama, an ethnic Chinese Christian, and calls for voters to choose a Muslim leader for the city.
Analysts say divisions could linger and even deepen as the vote, which is also being widely seen as a proxy battle for the next presidential election, in 2019, appeared to be heading for a second round, according to unofficial sample vote counts.
Purnama is backed by President Joko Widodo's ruling party.
His main rival, former education minister Anies Baswedan, is backed by a retired general, Prabowo Subianto, who is promising a comeback to the national stage after losing to Widodo in the 2014 presidential vote.
"There would be tension that will be stored until 2019, because of course all this is not really against Purnama, it's against Widodo. Prabowo is coming in now," said Wimar Witoelar, a Jakarta-based political analyst.
Purnama had secured 43.08 percent of the votes, just ahead of Baswedan on 40.14 percent, based on a quick sample count of about 95 percent of the vote by private polling firm SMRC.