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. "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-Qaida-affiliated Jemaah Islamiyah militants killed 202 people, many of them foreigners including dozens of Australians. Australia urged Indonesia last March against any leniency toward Bashir when the government was considering house arrest and other forms of clemency.
"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.
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.
Also due to be released from prison next week is the former governor of Jakarta, a Widodo ally and minority Christian who was toppled by a conservative Islamic movement in 2016 and subsequently sentenced to two years in prison on blasphemy charges.
Mahendradatta said he wanted Bahir'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. 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 U.S. and Australia.