Filepix of Anies Baswedan.
Polls have opened in Indonesia's capital for what is expected to be a tight race to elect Jakarta's governor after campaigns riven by religious and racial tensions. He said that field reports from the campaign and Gerindra party officials said things were looking good for their candidate. But extremist Islam tends to rear its head sporadically with tragic results, and the occurrence of terror attacks and bombings increasing in recent years.
"We want to celebrate pluralism and diversity".
The verse had been used by his opponents in the world's most-populous Muslim country to argue that Muslims should not vote for a non-Muslim leader.
Purnama voted early on Wednesday with his family in North Jakarta.
"Let's celebrate democracy with joy", he said.
Polls closed at 1pm (0600 GMT) with 7 million people eligible to vote.
A year ago the popular governor found himself embroiled in a blasphemy trial, after he cited a verse from the Koran, Al Maidah 51, telling voters they should not be deceived by religious leaders who claim Muslims can not vote for Christians.
Ahok vowed at a press conference to use his remaining time in office to continue ambitious infrastructure and development projects that have improved Jakarta.
"This victory is not simply about Anies.being backed by radicalism", said Alissa Wahid, daughter of former president Abdurrahman Wahid, whose death in 2009 left Indonesia without a pluralist leader of any stature.
"Political differences should not break our unity", said Widodo after casting his vote at a central polling station.
But despite being one of Indonesia's most polarising elections, with protests, attempted coups, as well as Basuki being charged with insulting Islam, Polling Day was peaceful. He has won praise for cleaning up once-filthy rivers and creating more green spaces, although his acerbic style has upset some.
His administration has also built more parks and playgrounds.
We'll soon find out which of them was right.
Baswedan, a respected academic, has capitalised on the discontent, vowing to upgrade existing houses instead of evicting.
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.
Ahok, who was Jakarta's first ethnic Chinese governor and first Christian in half a century, has been popular with middle-class Jakartans for his efforts to stamp out corruption and make the overflowing polluted capital more livable.
A man casts his ballot during the local election in Jakarta, Indonesia, Wednesday, April 19, 2017.
Basuki is backed by President Joko Widodo's ruling party. Ahok's rival Baswedan was supported by the political and business elite that Jokowi unexpectedly bested in the 2014 presidential election and who will be seeking to unseat him in 2019.
Purnama, the former vice governor, was promoted after Widodo because the country's leader.
"Hopefully after today, the politics in Indonesia will calm again", she said. "We are all brothers and sisters".
Security has been beefed up across several polling stations in the city.
Police in neighbouring provinces on Java island searched private cars and public buses heading for Jakarta on Tuesday to look for sharp objects and explosives.
The Jakarta election will be seen as a barometer for the 2019 presidential election, given the city's outsized importance as both the nation's capital and commercial centre.
The governor is on trial over blasphemy charges after an edited version of comments he made at a November rally went viral on Indonesian social media.
On Thursday, members of hardline groups, which led hundreds of thousands of Muslims to protest against Purnama during the election campaign, reacted angrily to the prosecutor's call.
After an anti-Purnama protest a year ago turned violent, authorities were taking no chances and over 60,000 security forces had been deployed. Indonesian stocks are up 12.6 per cent on the year, making the Jakarta market one of Asia's best performers.
Almost all blasphemy cases in recent years have resulted in convictions.
Yesterday's election was held amid heightened security.