Millions of Indonesians are heading to the polls to elect the capital's next governor following an election campaign marred by religious intolerance and racial bigotry.

More than 13,000 polling stations opened across Jakarta on Wednesday to accommodate the 7.1 million people eligible to vote, one of dozens of elections taking place across the Muslim-majority country.

The Jakarta election pits incumbent governor Basuki "Ahok" Tjahaja Purnama against Anies Baswedan, a former education minister, and Agus Yudhoyono, the son of former President Susilo Bambang Yudhoyono.

Ahok, an ethnic Chinese Christian, has been dogged by a blasphemy case triggered by comments he made about the Quran that were deemed insulting to Islam and Muslims.

In September, he told a crowd of his supporters that if they were afraid of going to hell if they elected a non-Muslim as their leader, they need not worry as they had been lied to "using Surah Al-Maidah verse 51."

Some Muslims interpret the Quranic verse in question as prohibiting them from electing non-Muslims as their leaders.

Ahok has denied that he intended to insult the Quran, saying he was referring to those who misused religion for political purposes.

After two massive protests by conservative Muslims, he was charged and is now on trial for blasphemy, though he remains free to contest the poll.

The 50-year-old led opinion polls in the run-up to the election, but according to analysts is not expected to win more than 50 percent of the votes, making a run-off unavoidable.

Al Jazeera's Step Vaessen, reporting the capital, said turnout would be high with so much at stake.

"The situation is currently calm, which is in huge contrast to how things were during campaigning. Religion was used as an instrument in the build up to the vote and this has created tension among religious groups across the country.

"Analysts are calling the vote a test of Indonesian democracy but also of Indonesian religion and pluralism," she added.

'Fake news'

The campaign period was also marked by rising anti-Chinese sentiment sparked by false news spreading online, including rumours that millions of Chinese were coming to Indonesia illegally.

Ahok has won praise from many Jakartans for cleaning up rivers clogged with rubbish, as part of his flood prevention programme, and building more parks.

But critics say his moves to evict squatters and slum dwellers to make way for development have increased poverty and caused dispossession.

Ahok's closest rival, Baswedan, has courted the votes of conservative Muslims despite his past reputation as a liberal Muslim reformer.

Support from conservatives rose after he visited the headquarters of the Islamic Defenders Front, whose leader, Muhammad Rizieq Shihab, was a key member of the anti-Ahok protests.

Official results will not be announced until the end of this month, but pollsters were expected to reveal so-called "quick counts" later on Wednesday.

Quick counts have proved to be accurate in predicting the results of past elections.

A second round election between the two candidates with the most votes is scheduled for April 19.