Anies Baswedan was on 56-57 per cent in the race to lead Jakarta compared to 41-43 per cent for incumbent Basuki Tjahaja Purnama, who is fighting for his job as he stands trial for blasphemy, according to a sample of votes counted by several private pollsters.
The vote is seen as a test of whether the moderate Islam traditionally practised in the world's most populous Muslim country is under threat from hardliners, who have led mass demonstrations against Purnama.
Purnama, the city's first non-Muslim governor for half a century and its first ethnic Chinese leader, won the first round in February but not by a big enough margin to avoid a run-off.
The race was already significant as politicians see the job as a stepping stone to the presidency in 2019 polls, but the stakes were raised dramatically by a controversy sparked by claims that Purnama had insulted the Koran.
The allegations drew hundreds of thousands of conservative Muslims onto the streets of Jakarta in major protests last year, and led to Purnama - known by his nickname Ahok - being put on trial for blasphemy in a case critics see as politically motivated.
Opinion polls in the run-up to the vote indicated that the race was neck and neck but in the event, Baswedan appeared on course for a strong victory.
The former education minister, who was accused of cosying up to hardliners to win votes from disaffected Muslims during the election campaign, thanked Jakarta's voters for supporting him.
The 47-year-old also hinted that he would move to heal the divisions in the capital, if his victory is confirmed: "We celebrate diversity... We are all ready to work together again."
Over 7.2 million people were registered to vote in the polls.
Official results will not be released until early May but the private pollsters are usually accurate.
After an anti-Purnama protest last year turned violent, authorities were taking no chances and over 60,000 security forces had been deployed.
Hardline groups had pledged to station monitors at polling booths. Police blocked the plan, warning it could cause "intimidation", but groups appeared to be outside some polling centres in defiance of the ban.
However there was no sign of unrest and police said the election had run smoothly.
Despite Purnama's first-round victory, Baswedan had been seen as the favourite in the run-off because the votes from a third, Muslim, candidate who was knocked out were expected to go to him.
But with tension over the governor's alleged blasphemy subsiding in recent weeks, Purnama appeared to regain momentum.
Purnama's troubles began in September when he lightheartedly said in a speech that his rivals were tricking people into voting against him by using a Koranic verse, which some interpret as meaning Muslims should only choose Muslim leaders.
His long-running blasphemy trial began in December, and the verdict is expected within a few weeks.
If he were to have won the vote and then be convicted of blasphemy, he would not automatically be barred from holding office and could avoid jail for a long time by appealing.
Many voters still support Purnama due to his record leading Jakarta since 2014. He has won praise for cleaning up once-filthy rivers and creating more green spaces, although his acerbic style has upset some.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)