Abu Bakar Ba'asyir is considered Indonesia's most high-profile radical Muslim cleric and has been linked to the 2002 Bali bombings.
The 82-year-old is the former head of Jemaah Islamiah (JI), an al-Qaeda-inspired group behind the attack that killed 202 people.
In March 2005 he was jailed for conspiracy over the blasts, but his conviction was later quashed on appeal.
He was jailed again in 2011 on a separate conviction of supporting militants in Indonesia's northern Aceh province.
In January 2021, after completing two-thirds of his jail term, he was released.
The decision to release Ba'asyir has drawn mixed reactions. Some Indonesians have urged compassion for the ageing cleric while others fear the implications of freeing a notorious extremist.
Born in 1938, in East Java, Ba'asyir has spent decades teaching religion.
He swiftly rose to become one of the most influential jihadi ideologues in South East Asia.
A consistent theme of his teachings has been that Islamic communities are the necessary pre-condition for setting up an Islamic state.
In 1972, he co-founded the Al-Mukmin Islamic boarding school in Ngruki, Central Java, with Abdullah Sangkar.
Many graduates of the school have been implicated in Islamist militant attacks, and the International Crisis Group describes the school as the "Ivy League" for recruits to JI.
In the late 1970s, he was jailed for subversion by authoritarian leader Suharto after he was accused of promoting an Islamic state.
He later fled to Malaysia and lived in exile to avoid additional jail time, only returning to Indonesia following the fall of Suharto in 1998.
Almost immediately he renewed his campaign for Indonesia to become a strict Sharia state.
Following the Bali bombings in 2002, Ba'asyir was arrested and accused in connection with a number of bomb attacks, including one on the Marriott Hotel in Jakarta in 2003 that killed 12 people.
He was even accused of planning the assassination of Megawati Sukarnoputri, Indonesia's former president.
But prosecutors struggled to make most of the charges stick.
In October 2004, he was charged with involvement in the Bali and Marriott Hotel attacks.
After a trial, judges ruled that he had not been directly involved in the bombings, but he had given his approval.
He was sentenced to 30 months in jail for being part of an "evil conspiracy" over the Bali attacks, while charges related to the Marriot blast were dismissed.
Ba'asyir was released in June 2006, and had his conviction overturned by the Supreme Court six months later.
The cleric has repeatedly denied all the charges against him, as well as any link with JI, and condemned the Bali bombing as a "brutal act". He has insisted that he is just a simple preacher.
In May 2010, Ba'asyir returned to the spotlight when officers raided the headquarters of the Jamaah Anshorut Tauhid (JAT) - a group he had established in 2008.
Three JAT members were arrested and accused of having links to a militant training camp in Aceh.
The Aceh camp - which included members of most of Indonesia's high-profile militant groups - was accused of plotting to form a militia capable of attacking high-level government targets, as a prelude to forming an Islamic state.
On 9 August 2010, Ba'asyir was arrested over his connection to the camp and a year later he was jailed for 15 years. He was convicted of providing the camp with funding and playing an active part in setting it up.
He has always insisted he had no links with the Aceh camp, and JAT has denied any connection to extremism, insisting it is a legitimate Islamic organisation.
In January 2019 Indonesian President Joko Widodo, while seeking re-election, said the ageing preacher would be released on medical grounds.
The call to free the terrorism convict already had some prominent supporters including the religious affairs minister who asked the public to forgive Ba'asyir.
But the decision also drew widespread criticism. In Australia it prompted Prime Minister Scott Morrison to ask Indonesia to show "great respect" for his country. Eighty-eight Australians were among those who died in the Bali bombings.
At the time, Sidney Jones, director of the Institute for Policy Analysis of Conflict in Jakarta, said that President Widodo's decision was "misguided, legally questionable, and politically inept".
"It sends the message that if one defies the state long enough, it will eventually capitulate. It emboldens those who see democracy as incompatible with Islam because that's what Ba'asyir has been arguing all his life," she wrote for The Interpreter, published by the Sydney-based think tank the Lowy Institute.
The planned release never happened after the decision was later reviewed. It was scrapped as Ba'asyir reportedly declined to pledge allegiance to Indonesia's state ideology.
In early 2021, the government announced Ba'asyir's release, saying it would be "in accordance with the expiration date and the end of his term".
Ba'asyir had his sentence reduced by 55 months. Local news agency Antara quoted an official as saying he had "served his punishment well and followed all the rules and procedures".