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. # Candidate Running mate Parties 1 Agus Harimurti Yudhoyono Sylviana Murni 2 Basuki Tjahaja Purnama Djarot Saiful Hidayat 3 Anies Baswedan Sandiaga Uno

Campaign and issues 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 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 and receiving 58% of the vote in the gubernatorial election.

Opinion polls First round Poll sourceDateSample sizeLeadError marginAgusBasukiAniesMedian29 Jan – 2 Feb 2017 80026.1%29.8%27.8%2.0%± 3.4%Poltracking29 Jan – 2 Feb 2017 80025.75%30.13%31.50%1.37%± 3.46%Populi Center28 Jan – 2 Feb 2017 60021.8%40.0%30.3%9.7%± 4.0%Poltracking24–29 Jan 201780025.8%30.1%31.5%1.4%± 3.5%Charta Politika17–24 Jan 201776725.9%36.8%27.0%9.8%± 3.5%SMRC14–22 Jan 201780022.5%34.8%26.4%8.4%± 3.9%Populi Center14–19 Jan 201760025.0%36.7%28.5%8.2%± 4.0%Indikator12–20 Jan 2017 80823.6%38.2%23.8%14.4%± 3.8%Lembaga Survei Indonesia3–11 Dec 201680026.5%31.8%23.9%5.3%± 3.5%LSI Denny JA1–6 Dec 201644033.6%27.1%23.6%6.5%± 4.8%Charta Politika17–24 Nov 201673329.5%28.9%26.7%0.6%± 3.5%Indikator15–22 Nov 201679830.4%26.2%24.5%4.2%± 3.6%Poltracking7–17 Nov 2016120019.2%15.9%14.3%3.3%± 2.8%LSI Denny JA31 Oct – 5 Nov 201644032.3%10.6%31.9%0.4%± 4.8%Indocon18–30 Oct 201657526.4%30.1%21.6%3.7%± 4.0%Kedai KOPI19–24 Oct 201669421.0%27.5%23.9%3.6%± 4.0%SMRC1–9 Oct 201664822.4%45.4%20.7%23.0%± 3.9%Median26 Sep – 1 Oct 201650021.0%34.2%25.4%8.8%± 4.4%Populi Center25 Sep – 1 Oct 201660015.8%45.5%23.5%22.0%± 4.0%LSI Denny JA26–30 Sep 201644019.3%31.4%21.1%10.3%± 4.8%

Second round Poll sourceDateSample sizeLeadError marginBasukiAniesMedian21–27 Feb 201780039.7%46.3%6.6%± 3,4%LSI Denny JA27 Feb – 3 Mar 201744040.5%49.7%9.2%± 4.8%SMRC"Survei SMRC: Anies Cuma Unggul 1% dari Ahok"31 Mar – 5 Apr 201744646.9%47.9%1.0%± 4.7%Median"Survei Median: Warga Puas Kinerja Ahok, tapi Pilih Anies"1–6 Apr 20171,20043.5%49.8%6.3%± 2.9%LSI Denny JA7–9 Apr 201744042.7%51.4%8.7%± 4.8%Charta Politika"Survei Charta Politika: Ahok-Djarot 47,3%, Anies-Sandi 44,8%"7–12 Apr 201778247.3%44.8%2.5%± 3.5%Indikator"Survei Indikator: Elektabilitas Anies-Sandi 48,2%, Ahok-Djarot 47,4%"12–14 Apr 201749547.4%48.2%0.8%± 4.5%Median13–14 Apr 201755047.1%49.0%1.9%± 4.2%

Results

Aftermath The racism and identity politics issue raised during the election had a prolonged effect on Jakartan society. As late as 2020, analysts noted that "the wound from the election had yet to heal". When Baswedan made a presidential run in 2024, he received less than 2% of the Christian vote, which was attributed to the use of identity politics in the 2017 election despite assurances from his running mate, Muhaimin Iskandar, that they will not employ identity politics in the presidential election.

References