Ageing terrorist leader Abu Bakar Ba’asyir and former Jakarta governor Basuki “Ahok” Purnama are both expected to be released from jail within days of each other this week, Ba’asyir six years ahead of schedule and Purnama after serving a near-full two-year term for blasphemy.

Analysts say there is clearly a connection between the two events, coming only three months before the 2019 presidential and legislative elections, and may be a further effort by President Joko Widodo to get Islamic conservatives on his side.

The spiritual founder of the now-shattered Jemaah Islamiyah (JI) terror network, an al Qaeda affiliate, the frail 80-year-old Ba’asyir has served eight years of a 15-year sentence for inciting terrorism and funding a para-military training camp in Aceh province.

Widodo said he pardoned the toothy cleric on humanitarian grounds, despite his refusal so far to sign a declaration pledging his loyalty to the unitary state of Indonesia, which correction officials suggest is a normal prerequisite.

Ba’asyir has been treated recently for chronic venous insufficiency, a pooling of blood in the legs, but apart from other age-related issues there is nothing to suggest that his medical condition has undergone significant deterioration.

“This has been a long-discussed issue since the beginning of last year,” the president said, acknowledging the role of former justice minister Yusrul Mahendra, who acts as a lawyer for both Ba’asyir and the Widodo election campaign.

Widodo also said he consulted justice ministry officials and National Police chief Gen Tito Karnavian, the former head of the Detachment 88 counter-terrorism unit, which has tracked down hundreds of militants since it was created in  2003.

Karnavian was responsible for arresting Ba’asyir in August 2010, for his role in establishing the Aceh training camp and also planning a fresh wave of attacks against foreign embassies and Jakarta’s national police and Mobile Brigade headquarters.

Purnama received a year-end remission, slicing two months off his scheduled release date. He is expected to spend only a few days in Jakarta before flying to Vancouver at the start of an overseas trip which will last beyond the April 17 elections.

“It’s his decision and if I was in his position I would do the same,” one close confidante told the Asia Times. “He’s calm, he’s more mature and he’s  thought a lot about his past mistakes. He realises there’s a need for introspection in his life.”

Ba’asyir has never felt that need, detested in Australia as the perceived evil mastermind behind the 2002 Bali nightclub bombing — the worst terrorist outrage since 9/11 — which killed 202 people, including 88 Australians and 38 Indonesians.

He was initially convicted of conspiring with the Bali bombers, three of whom were subsequently executed, but that charge was overturned by the Supreme Court 26 months into a 30-month sentence and he left prison in December 2006.

It is not clear when Ba’asyir will walk free from a prison in Bogor, where he was moved in 2016 after serving the first five years of his sentence at the maximum-security Nusakambangan island prison off Central Java’s south coast.

Ba’asyir is now expected to return to Solo in Central Java to live with his family, including two sons, Abdul Rosyid, 44, and Abdul Rahim, 41, who have reportedly persuaded him to renounce his former allegiance to the Islamic State (ISIS).

‘He’s beyond the sell-by date’

The Government has described his pardon as unconditional, but officials have yet to reveal what restrictions may be placed on his future movements and whether he will be allowed to meet known jihadis.

“He’s beyond the sell-by date, but that doesn’t mean he will stop supporting jihad,” says Sidney Jones, director of the Institute for Policy Analysis of Conflict (IPAC). “It’s likely he will be meeting a stream of well-wishers, including all the extremists on the block.”

Formed in 2008  after the collapse of JI, Ba’asyir’s Jamaah Anshorat Tauhid (JAT) was one of seven different extremist organizations to openly declare their support ISIS when the movement began to expand its caliphate through Iraq and Syria in 2014.

The UN Security Council placed both of Ba’asyir’s sons on its Al Qaeda sanctions list in 2011, the same year the US Treasury Departmment specifically named Abdul Rosyid as recruiter and fundraiser of JAT a newly-designated terrorist organization.

Islamist hardliners have little reason to protest Purnama’s release now that he has served his sentence, especially with one of his persecutors, conservative cleric Ma’ruf Amin, running as Widodo’s vice-presidential candidate.

Australia urged Indonesia not to grant leniency for Ba’asyir after his supporters began a push for his early release last year. The move failed to gain any traction, but Mahendra says he kept up a quiet campaign over the past nine months.

The lawyer’s comment that Widodo can now not be accused  of ‘criminalizing’ Muslim clerics has puzzled observers, given the seriousness of the cleric’s crimes and the fact that he was convicted in a court of law.

Amin said recently that he regretted the former Christian-Chinese governor had been sent to prison, but he made it clear that it had been his duty as head of the Indonesia Ulema Council (MUI) to ensure the law followed its course.

Widodo’s aides met with Purnama a month ago to talk about his post-release plans, which will also include a single January 26 television interview that will almost certainly steer well clear of politics and focus on general subjects.

Acknowledging his once-promising political career has ended, Purnama is giving serious thought to becoming a motivational speaker and to accepting an invitation to study public policy at Harvard University’s John F. Kennedy School of Government.

He also has some unfinished business of a very different kind. Friends say he intends going ahead with plans to marry the policewoman who served as the bodyguard to his first wife before their divorce last year over her alleged infidelity.