JAKARTA — After a tense campaign marred by religious protests and phone-tapping allegations made by a former president, Indonesia’s capital will have to wait two more months to learn who will run the city of 10 million people.

Incumbent governor Basuki Tjahaja Purnama, known as “Ahok,” will face a runoff election in April against a former education minister who was backed by Islamist protesters, turning the election into a test of religious tolerance in the world’s largest Muslim-majority country.

Purnama, a Christian of Chinese descent and an ally of President Joko Widodo, won around 40% of the votes cast Wednesday according to preliminary counts. That was roughly the same as his rival, Anies Baswedan, a Muslim whose reformist credentials came under scrutiny when Islamist supporters sought to have the sitting governor jailed over a speech in which he allegedly insulted Islam.

The vote was widely seen as a preview of Widodo’s 2019 reelection chancesand a test of how Indonesia’s Muslims regard ethnic and religious minorities in positions of authority.

Purnama, who served as deputy governor when Widodo led Jakarta before becoming president in 2014, is known for a blunt and outspoken style. Although lauded for a can-do attitude and willingness to confront recalcitrant bureaucrats, his policy to clear the sprawling capital’s slums and minority status made him a target of controversy.

Massive demonstrations in late 2016 saw central Jakarta jammed with hundreds of thousands of white-clad Islamists calling for Purnama to be jailed for remarks he made about how people vote that were seen by some to insult the Koran, the Muslim holy book. In the weeks leading up to Wednesday’s vote, Baswedan appeared in public with some of protest leaders.

Purnama’s cause wasn’t helped when Widodo – who initially blamed “political actors” for the demonstrations – joined the rallies from the nearby presidential palace and prayed with protest leaders.

But Purnama rebounded in pre-election polls, a sign that the demonstrations were not a barometer for voter support in the capital “because those rallies consisted of many people coming from outside Jakarta,” said Titi Anggraini, head of Perludem, an election advocacy group.

Responding to a question from The Times as he arrived at his campaign headquarters after voting, Basdewan would not say if he felt he would win a run-off.

“So far the campaign has gone well and we will have to wait to see what happens,” he said.

The next round of voting, on April 19, could be decided by the roughly 20% of voters who backed a third candidate, Agus Harimurti Yudhoyono, son of former two-term President Susilo Bambang Yudhoyono.

Yudhoyono’s campaign was marred by allegations that his father tried to have a former head of Indonesia’s anti-corruption agency framed for murder. The ex-president rejected the allegations and accused Widodo’s government of eavesdropping on his communications.

Many analysts contend that Yudhoyono’s votes are likely to go to Baswedan in the next round. But others say that Purnama’s strong showing suggested that he had support from many Muslim voters.

Ethnic Chinese Indonesians make up an estimated 1-3% of the archipelago nation’s 250 million people.

Christina Soelystio, a Chinese Indonesian who voted at the same polling station as the governor, said the campaign had caused concerns among her ethnic group.

“Some Chinese see it as change for the better, some for the worse,” she said. “Some are worried about the sensitive situation. But others are proud of [Purnama].”

Speaking after casting his ballot at a green-hued mosque in southern Jakarta, Hadi Nasution said he voted for Basdewan “because the Koran says to vote for Muslims” and he was more experienced than Yudhoyono, the other Muslim candidate.

Anies Baswedan, a former education minister, will face Purnama in an April 19 run off election (Photo: Simon Roughneen)