(CNN)Indonesians this week got a taste of how far their outwardly secular President Joko Widodo, known as Jokowi, would go to buttress his reelection campaign against attacks from Islamic hardliners who don't see him as Muslim enough to lead.
Indonesia's Jokowi is walking a tightrope as he tries to appeal to Muslim voters
Jihadi cleric Abu Bakar Bashir is currently facing a parole review after serving two-thirds of a 15-year sentence for facilitating a terror training camp. Bashir is best known as the "spiritual leader" of the homegrown terror network that carried out the 2002 Bali bombings which killed 202 people.
Jokowi's first instinct was to sympathize with the 81-year-old's ailing health. Family members say Bashir can no longer walk, and he likely does not have many years left.
This concern was immediately rejected as misplaced and cynical by many of Jokowi's liberal supporters as well as hardliners who never believed he had the religious credentials to lead the world's largest Muslim nation, said Ian Wilson, an Indonesia expert at Australia's Murdoch University.
"It was a poorly executed political gambit," Wilson said. "Jokowi could see Bashir's parole date was approaching but knew that he would never fulfill the requirements."
Offered freedom on the condition he swear loyalty to Indonesia's secular state, the radical preacher instead chose to remain locked up in the West Java jail cell where he once pledged allegiance to the so-called Islamic State.
"Bashir has never expressed guilt or remorse. Fundamentally he rejects Indonesian nationalism," Wilson said.
This caused Jokowi -- walking an election tightrope with his liberal base on one side and an increasingly assertive religious right on the other -- to lose his footing. "The people he was trying to appeal to were never going to buy this," Wilson added.
On the opposite side of Jokowi's balancing act is another jailed man -- this time walking free.
Basuki Tjahaja Purnama, the Chinese Indonesian former governor of Jakarta known as Ahok, left prison Thursday, two years after the erstwhile Jokowi ally was jailed for blasphemy.
A Christian, Ahok fell afoul of Indonesia's rigid blasphemy law during a 2016 rally when he quoted the Koran to assure Muslims there was no reason they could not vote for a non-believer. Tens of thousands turned out in mass street protests calling for him to be not only voted out of office, but jailed.
According to Human Rights Watch, Ahok's treatment showed "non-Muslims ... need to be especially careful before making public comments about diversity and pluralism."
If anything, the climate has only grown more tense in the years since.
April's general election puts Jokowi up against Prabowo Subianto, a former general who has proven himself willing to leverage the President's links to Ahok against him.
After losing to Jokowi heavily in 2014, Prabowo has this time found support with the cluster of conservative religious groups critical of the current administration.
Increased involvement by Islamic groups in politics is in part aided by "effective organizing by radical groups and an alliance between some military or former military and Islamists," said Josh Kurlantzick, senior fellow for Southeast Asia at the US-based Council on Foreign Relations.
Hardline Muslims have flocked to Prabowo's rallies. "It is haram for us to vote for presidential and legislative candidates backed by parties supporting the blasphemer," firebrand preacher Rizieq Shihab told attendees at one rally in December, tying Ahok to Jokowi despite the President distancing himself from his former ally during his legal troubles.
In an apparent effort to eat into Prabowo's conservative support, Jokowi has ushered elements of Indonesia's religious right into his own re-election campaign. Among Jokowi's new inner circle is the conservative cleric Ma'ruf Amin, who will be his vice-presidential candidate.
Meanwhile, Jokowi's campaign legal advisor is Yusril Ihza Mahendra -- who also provides council to Abu Bakar Bashir.
"Jokowi's choice of running mate is clearly a calculated political move," said Melissa Crouch, Indonesia expert and associate professor at the University of New South Wales. "Jokowi is very concerned about a range of allegations that continue to circulate about him. Many accused him of being a communist, for example. He is not."
Before joining the campaign, Ma'ruf pledged allegiance to Indonesia's democratic tenants. But the well-known preacher continues to be known for his intolerant views towards religious minorities, Crouch said.
Jokowi's pact with Ma'ruf, whose controversial positions include outlawing LGBT relationships, "is an indication that those who openly support pluralism, liberalism and secularism have been under attack for some years now," she added.
"The difficulty for voters who would like to see greater respect for tolerance and diversity is that neither presidential pair stand for these values."
Five years ago, Jokowi won the presidency on a wave of support from liberal Indonesians. The "Jokowi effect" cast the former furniture salesman as a down-to-earth leader far from Indonesia's military or business elites.
In teaming up with Ma'ruf, according to Wilson, Jokowi has alienated many of his own supporters and failed to convince religious voters who are more savvy than politicians believe.