Police said 15 people were detained following reports of disturbances at several polling stations in the city of 10 million people, after what the Jakarta Post this week dubbed "the dirtiest, most polarizing and most divisive" election campaign the nation had ever seen.
Security appeared light at several polling stations, though police said 66,000 personnel were deployed across the city.
Religious tensions have been an undercurrent in the campaign, with Purnama on trial for blasphemy over comments he made last year that many took to be insulting to Islam.
Hundreds of thousands of Muslims took to the streets late last year to call for his sacking and to urge voters not to elect a non-Muslim leader. One person died and more than 100 were injured after one protest turned violent.
Some voters may have been reluctant to vote for Purnama because of worries about "five more years of protests on the streets by Muslim hardliners," Loveard said in a telephone interview.
Ismail Yusanto, spokesman for one of the groups, Hizbut Tahrir Indonesia, said the election showed that Jakarta voters didn't want a non-Muslim leader.
"It is forbidden under Islamic law, to have an infidel leader," he told Reuters.
Members of hardline groups, including the Islamic Defenders Front (FPI), celebrated the election result at Istiqlal mosque in central Jakarta on Wednesday evening, praying and cheering for the governor-elect.
Baswedan and Prabowo were also expected at grand mosque to join the prayers, according to media reports.