The ailing 80-year-old radical cleric who inspired the Bali bombers and other violent extremists in Indonesia will be released from prison, Indonesia's president says, slashing a 15-year sentence.

The announcement of Abu Bakar Bashir's imminent release came during campaigning for a presidential election due in April in which opponents of President Joko Widodo have tried to discredit him as insufficiently Islamic.

"I have considered this decision for a long time, involving the National Police chief and legal experts," Widodo told reporters.

Getty Images

"This release was decided because of humanitarian considerations and also related to his health care."

The 2002 bombings on the popular Indonesian tourist island of Bali by al-Qaeda-affiliated Jemaah Islamiyah militants killed 202 people, many of them foreigners including 88 Australians.

Scores of the more than 200 people killed in the 2002 bombings of Bali nightclubs were Australian and Canberra has previously urged against leniency for Bashir.

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

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

"Stunned that he is about to be released," said Jan Laczynski, an Australian who lost five friends in the bombing of the Sari Club in Bali and narrowly avoided being at the venue himself.

"Truly devastating news as effectively he gets on with his life whilst everyone else suffers from seeing him walk out of jail," he said.

AAP

Bashir's lawyer, Muhammad Mahendradatta, said Bashir, who was sentenced and imprisoned in 2011, would be released within days.

"We haven't had the exact date of his release, but because Bashir badly needs serious health care the release will be carried out no later than next week," he told The Associated Press.

Mahendradatta said he wanted Bashir's release to be without any conditions, enabling him to meet supporters and give sermons.

However, another Bashir lawyer who is also an adviser to Widodo, Yusril Ihza Mahendra, told Indonesian TV that the cleric accepted conditions and would do nothing except rest and be close to his family.

Widodo said Mahendra was among the legal experts he sought advice from.

Read more First debate of Indonesian election campaign disappoints viewers

The firebrand cleric was arrested almost immediately after the Bali bombings. But prosecutors were unable to prove a string of terrorism-related allegations. He was instead sentenced to 18 months in prison for immigration violations.

In 2011, he was sentenced to 15 years in prison for supporting a military-style training camp for Islamic militants.

The 2002 bombings were a turning point in Indonesia's battle against violent extremists, making heavy security a norm in big cities and forging closer counterterrorism cooperation with the US and Australia.

- with Reuters