2017 Jakarta gubernatorial election

Gubernatorial elections were held in Jakarta as part of the 2017 simultaneous elections on 15 February and 19 April 2017 to elect the governor of Jakarta to a five-year term. Incumbent governor Basuki Tjahaja Purnama, popularly referred to as "Ahok", and his deputy Djarot Saiful Hidayat were running for re-election to a second term. Basuki, who inherited his current position from his running mate Joko Widodo when he won the 2014 Indonesian presidential election, would have become the first elected Chinese-Christian governor of Jakarta had he won.

Under the constitution, if no candidate secured a majority of the votes, a runoff election would be held between the top two candidates. The results of quick counts in the first round indicated that Purnama led by a narrow 3–4% margin, and that a runoff would be held on 19 April.

Quick counts for the 19 April runoff indicated that Anies Baswedan was elected as governor; Ahok conceded defeat hours after the polls closed. The official results of the election is Anies Baswedan - Sandiaga Uno 57.96% to Basuki Tjahaja Purnama - Djarot Saiful Hidayat 42.04% published by General Elections Commission (KPU) of Special Capital Region of Jakarta in May; however, unofficial tallies from the election commission showed that Baswedan won 58% to Ahok's 42%.

Candidates
Under regulations, only political parties having 22 seats or more in the regional parliament (DPRD) can put forward a candidate. Political parties with fewer seats can put forward a candidate only if they have acquired support from other political parties. Independent candidates are able to run if they have gathered at least 532,213 signatures from local residents, which will be verified by the local election committee.

This election was contested by three candidates together with their running mate.

Racism
A candidate and a member of a minority ethnic group, Basuki has become the subject of occasional racist comments. During the 2017 gubernatorial campaign, he was regularly targeted by ultra-conservatives and supporters of rival candidates for being of Chinese descent. Furthermore, Basuki's "double minority" background makes him a target of the hardliner Islamic Defenders Front (FPI). The group called for the revision of the Jakarta Charter constitution to remove some of the governor's responsibilities for government-affiliated Islamic organizations.

Allegations of Quran insult
On 27 September 2016, in a speech in front of citizens of Thousand Islands, Ahok noted that some citizens would not vote for him because they are being "deceived using Verse 51 of Al-Ma'idah and variations of it," referring to a verse that some groups have cited as grounds to oppose him. The provincial government of Jakarta uploaded the video recording to YouTube in a channel which often feature Ahok's activities. Citizens and pundits criticized Ahok's statement, considering it an insult on the Quran. The video became popular and Ahok was widely criticized in social media such as Facebook and Twitter. A Change.org petition criticising him gained tens of thousands of signatures. Ahok was later convicted of blasphemy for the comment and sentenced to a two-year prison term.

Zakir Naik's visit to Indonesia
From 1 April to 10 April 2017, a controversial Indian preacher Zakir Naik came to Indonesia in preparation for a da'wah safari in several cities in Indonesia. On the evening of April 8, the Patriot Chandrabhaga Stadium in Bekasi, a suburb of Jakarta, was filled to its capacity of 20,000. Zakir Naik, who is facing probes in India, was on the podium. He reiterated what Indonesia’s conservative Islamic groups that had been rallying for in the run-up to Jakarta’s gubernatorial elections on April 19, that Indonesians should elect only a Muslim leader. An Indian newspaper The Hindu mentioned that there was "a correlation" with Zakir Naik's lecture in Indonesia which was broadcast via YouTube with the victory of Anies Baswedan who outperformed Basuki Tjahaja Purnama occupying 58% of the vote in the gubernatorial election.

Results
! colspan="2" rowspan="2" align="left" | Candidates ! rowspan="2" colspan="2" align="left" | Parties ! colspan="2" | 1st round ! colspan="2" | 2nd round ! width="75" | Votes ! width="30" | % ! width="75" | Votes ! width="30" | % ! colspan="4" align="left" | Total ! 5,499,865 ! 100% ! 5,591,353 ! 100%
 * bgcolor="" |
 * align="left" | Anies Baswedan
 * align="left" | Gerindra
 * Gerindra
 * 2,197,333
 * 39.95%
 * 3,240,987
 * 57.96%
 * bgcolor="" |
 * align="left" | Basuki Tjahaja Purnama
 * align="left" | Indonesian Democratic Party – Struggle
 * PDI-P
 * 2,364,577
 * 42.99%
 * 2,350,366
 * 42.04%
 * bgcolor="" |
 * align="left" | Agus Harimurti Yudhoyono
 * align="left" | Demokrat
 * PD
 * 937,955
 * 17.05%
 * colspan="2" rowspan="2" bgcolor="#E9E9E9" |
 * colspan="8" bgcolor="#E9E9E9" |
 * 17.05%
 * colspan="2" rowspan="2" bgcolor="#E9E9E9" |
 * colspan="8" bgcolor="#E9E9E9" |
 * colspan="8" bgcolor="#E9E9E9" |
 * colspan="8" bgcolor="#E9E9E9" |
 * colspan="4" align="left" | Valid votes
 * 5,499,865 || 98.84%
 * 5,591,353 || 98.97%
 * colspan="4" align="left" | Spoilt and null votes
 * 64,448 || 1.16%
 * 58,075 || 1.03%
 * colspan="4" align="left" | Turnout
 * 5,564,313 || 75.64%
 * 5,649,428 || 77.02%
 * colspan="4" align="left" | Abstentions
 * 1,792,113 || 24.36%
 * 1,686,045 || 22.98%
 * colspan="4" align="left" | Registered voters
 * 7,356,426
 * style="color:inherit;background:#E9E9E9" |
 * 7,335,473
 * style="color:inherit;background:#E9E9E9" |
 * colspan="8" bgcolor="#E9E9E9" |
 * colspan="8" align="left" | Source: Electoral Commission of Jakarta (first round), Electoral Commission of Jakarta (second round)
 * }
 * style="color:inherit;background:#E9E9E9" |
 * 7,335,473
 * style="color:inherit;background:#E9E9E9" |
 * colspan="8" bgcolor="#E9E9E9" |
 * colspan="8" align="left" | Source: Electoral Commission of Jakarta (first round), Electoral Commission of Jakarta (second round)
 * }
 * colspan="8" align="left" | Source: Electoral Commission of Jakarta (first round), Electoral Commission of Jakarta (second round)
 * }