It was in 2004, as a PhD student in political science at Northern Illinois University, that Anies Baswedan would ponder the future interplay between Islam and Indonesia.

In his paper, “political Islam in Indonesia, present and future trajectory”,Baswedan pointed out that, “fertile ground exists for Islam-friendly political parties to attract considerable support from ‘Muslim’ voters.” Muslim voters, he explains in the footnotes, referred to devout and practising adherents of the faith.

X-Men illustrator faces backlash over alleged anti-Christian messages

Read more

More than a decade on, Baswedan is campaigning to become Jakarta’s next governor and seems to have wholeheartedly taken his own advice. Analysts say he has overtly courted the Muslim vote in the tight race against the ethnic Chinese Christian incumbent, Basuki Tjahaja Purnama, better known as “Ahok”.

On Wednesday, more than 7 million Jakartans will head to the polls in one of the most contested elections to date, marked by several massive, Islamic-inspired anti-Ahok rallies late last year, and an ongoing controversial blasphemy trial.

Neither Ahok nor Baswedan, a former education minister, won an outright majority in the first round vote this February when Agus Yudhoyono, the son of former president Susilo Bambang Yudhoyono, was knocked out.

Days out from the second and final round, Baswedan is just one point ahead, according to a survey by Saifiul Manjuni Research and Consulting (SMRC) released on 12 April. But before Ahok became engulfed in the blasphemy trial for allegedly insulting Islam, the picture looked very different – the incumbent had an approval rating of more than 70%.

The religion card

The only way to beat him, analysts say, would be to play the religion card and appeal to the Islamic base.

Aleksius Jemadu, dean of political sciences at Pelita Harapan University, says: “We cannot underestimate the effect of using religion,the last instrument they could use in order to win the election considering the fact that quite a number of people in Jakarta are conservative Muslims.”

“So it is a source of strength for Anies [Baswedan] to capitalise on that issue,” he adds, “on religious sentiment.”

Baswedan, a former rector of Paramadina University, was seen as a religious moderate before, the type to write an editorial in defence of religious tolerance.

Why LGBT hatred suddenly spiked in Indonesia

Read more

But as the Jakarta governor race has tightened Baswedan’s public image has morphed, argues Hendro Prasteyo, a professor of political sociology at Indonesia’s State Islamic University.

“From the beginning of November until now you can see how Anies always uses religious gestures. For example, he always wear the black peci, the black cap,” says Prasetyo, of the hat often worn by Muslim men.

“He is going to mosques, and then preaching in the mosque and he also shows his closeness to radical groups like the FPI [the Islamic Defenders Front]. The point is to show he is close to Muslims, and he represents Muslims,” notes Prasetyo, “He has had huge success by using religious symbols, which is contradictory to what he was before.”

Protesters gather for a protest against minority Christian governor Basuki ‘Ahok’ Tjahaja Purnama at the main business district in Jakarta in March 2017. Photograph: Tatan Syuflana/AP

Basewdan, agrees Jemadu, is less statesman, more politician these days.

“I don’t think that you can categorise him [Baswedan] as a man of principle,” says professor Jemadu, “He is quite pragmatic. Whatever benefits him he will take it, from one camp to another camp changing his principles, his values, all the way.”

Amid the blasphemy proceedings, the sometimes-brash Ahok has kept a lower than normal profile, opting for slick social media coverage and largely refusing interviews.

‘Anies is against Ahok, and Ahok is Christian’

The ethnic Chinese Christian governor understands the importance of religious symbols, too. Three days before the vote he is scheduled to inaugurate a new government-funded mosque in West Jakarta, with the president, Joko Widodo, by his side.

The use of religious symbols is nothing new in Indonesian politics, but the differences, ethnic and religious, have perhaps never been so stark, or as sensitive.

In neighbourhoods across the capital the idea that Muslims must choose Muslim leaders has spread over recent months, propagated in anti-Ahok pamphlets and banners strung up at local mosques, which threaten to deny funeral rights to Muslims who vote for Ahok.

More than 1,000 such discriminatory banners have been pulled down so far, an Ahok spokesperson told the Guardian. Baswedan has also condemned them – saying that if mosques refused an Ahok voter he would perform the burial rites himself.

But in the capital of the world’s largest Muslim-majority nation, the messaging has been effective. According to the SMRC survey, the main reason voters are choosing Baswedan is because they share the same religion.

“It’s ideology,” explains Prasetyo, “Most people don’t have sufficient information about Anies so what they see is Anies is against Ahok, and Ahok is Christian and Chinese, that’s it. That’s a very simplified way of understanding, and that’s enough. It shows how religion in Indonesia is still very, very important, and it’s dangerous,” he says.

Baswedan has denied pandering to Islamists, arguing the media has unfairly framed him meeting with the hardliners. His spokesman, Pandji Pragiwaksono, points out that Baswedan has repeatedly said religion should not be used as a weapon, and that he has in fact met various groups, because he wants to unify the city.

It is not Baswedan who has changed, he says, but the mood in the capital. “It is not about him changing his stance or who he is, it is the situation that has shifted and people are reacting to the situation by showing support for Anies,” he says.

“What has changed is that we have a contender in the Jakarta governor election race who is Christian,” he says, “That is new and that kind of ignites the hardliners.”