A radical Indonesian cleric once convicted for masterminding the 2002 Bali bombing terrorist attack will be released from prison on medical grounds, a decision that appears to be influenced by upcoming presidential and legislative elections.

Abu Bakar Bashir, 81, was the reputed spiritual leader of the Jemaah Islamiyah (JI) terror network, which was blamed for the 2002 bombings on the holiday island which killed more than 200 people, mostly foreign tourists.

It was Indonesia’s deadliest terrorist attack and prompted Jakarta to beef up anti-terror cooperation with the US and Australia, which has previously opposed clemency for Bashir.

Indonesian President Joko Widodo said on Friday that he had agreed to order the ailing preacher’s release from a prison on the outskirts of the capital, Jakarta. The release comes while Widodo aims to court conservative Muslim votes ahead of presidential and legislative elections set for April.

Widodo has been criticized by political opponents who have questioned his Islamic credentials, with some claiming he backs the “criminalization” of clerics.

“The first reason is humanitarian. He is elderly and his health is also a consideration,” Widodo told reporters, according to a statement from the Social Affairs Ministry on Bashir’s release.

Indonesian President Joko Widodo prays during Nuzulul Quran event at Presidential Merdeka Palace in Jakarta, Indonesia on June 5, 2018. Photo: NurPhoto via AFP Forum
Indonesian President Joko Widodo prays at the Presidential Merdeka Palace in Jakarta, June 5, 2018. Photo: NurPhoto via AFP ForumPhoto: NurPhoto via AFP Forum

A legal adviser in Widodo’s campaign team, Yusril Mahendra, said he had lobbied the president for Bashir’s release, Reuters reported.

“This shows to the public that it is not correct that Jokowi persecutes or criminalizes clerics,” Mahendra was quoted by Indonesia media as saying. Jokowi is the president’s nickname.

Australian Prime Minister Scott Morrison said on Saturday that he has been in contact with the Indonesian government on the decision.

“Australia’s position on this matter has not changed, we’ve always expressed the deepest of reservations,” Morrison told reporters in Melbourne.

It was not immediately clear when Bashir would be released from prison in Bogor, a satellite city near the capital Jakarta, or what the terms of his release would be.

Bashir’s lawyers said he was eligible for early release because he had served more than a third of his sentence, but he had refused to sign documents detailing the requirements for his probation.

Buildings and cars are on fire after a bomb blast in tourist site of Kuta, Bali 13 October 2002. At least 53 people including 10 foreigners, were killed when a bomb exploded in a popular nightclub on the Indonesian resort island of Bali. AFP PHOTO/ DARMA / AFP PHOTO / DARMA
Buildings and cars are on fire after a bomb blast in tourist site of Kuta, Bali October 13, 2002. Photo: AFP/Darma

In 2011, the firebrand preacher – once synonymous with militant Islam in Indonesia – was sentenced to 15 years in jail for helping fund a paramilitary group training in the conservative Islamic province of Aceh.

Bashir, the co-founder of an infamous Islamic boarding school known for producing militants, was jailed after authorities overran the camp.

Several militants convicted for their involvement in the Bali bombings have been executed while two others, including Malaysian Noordin Mohammed Top, a bomb-making expert, were killed in police raids in 2009 and 2010.

Bashir, who has repeatedly denied involvement in terror attacks, was also previously jailed over the Bali bombings but that conviction was quashed on appeal.

JI was founded by a handful of exiled Indonesian militants in Malaysia in the 1980s, and grew to include cells across Southeast Asia. It had known links with global terror network al Qaeda.

Muslim militant cleric Abu Bakar Bashir (C-in white) is guarded by Indonesian elite commandos as he leaves the police headquarters to undergo cataract surgery in Jakarta on February 29, 2012. Indonesia's top court on February 27 upheld a 15-year jail term against Islamist militant Abu Bakar Bashir for terrorist acts, reversing an earlier decision to slash the sentence to nine years. AFP PHOTO / ADEK BERRY / AFP PHOTO / ADEK BERRY
Muslim militant cleric Abu Bakar Bashir (C) is guarded by Indonesian elite commandos as he leaves the police headquarters to undergo cataract surgery in Jakarta on February 29, 2012. Photo: AFP/Adek Berry

As well as the 2002 Bali bombings, the radical group was blamed for a deadly 2003 car bomb at the JW Marriott hotel in Jakarta and a suicide car bomb the following year outside the Australian embassy.

An anti-terror crackdown has crippled some of Indonesia’s most dangerous networks, including specifically JI.

The Islamic State (IS) group has proved to be a potent rallying cry for Indonesia’s radicals, with hundreds traveling to the Middle East to join the jihadists.

Last year, a wave of deadly suicide bombings at churches and a police post rocked Indonesia’s second biggest city Surabaya.

Those attacks were carried out by families – including children – linked to local extremist network Jamaah Ansharut Daulah (JAD), which has pledged allegiance to Islamic State.

– This story draws on news agency reporting