Indonesian cleric Aman Abdurrahman was sentenced to death Friday for masterminding a 2016 Islamic State terror attack that saw a suicide bomber blow himself up at a Starbucks cafe.
Heavily armed police guarded the hearing at a Jakarta court, which had earlier found Abdurrahman guilty of ordering the attack that killed four in the capital.
It was the first attack claimed by the international terror network in Southeast Asia.
"(The defendant) has been proven to have committed a criminal act of terrorism," said judge Akhmad Jaini, who also cited Abdurrahman's involvement in other plots for the ruling.
"He will be sentenced to death."
Abdurrahman, who sat on a defendant's chair in the middle of the courtroom, appeared bored and showed little reaction as machine gun-toting guards stood nearby.
He gestured to his legal team and briefly kissed the floor after the decision, but said nothing audible.
His lawyer, Asludin Hatjani, described the ruling as "unfair", citing a lack of evidence connecting Abdurrahman to the deadly attack.
Executions are carried out by firing squad in the world's biggest Muslim-majority country, which has long struggled with Islamist militancy.
In 2002, bombings at the resort island of Bali killed over 200 -- mostly foreign tourists -- in Indonesia's worst-ever terror attack.
The assault in the capital two years ago saw security forces battle gun-toting militants near the cafe where a suicide bomber detonated his explosives.
Prosecutors demanded that Abdurrahman be handed a death sentence for his role in that attack last month.
Considered the de facto head of IS supporters in Indonesia, Abdurrahman -- believed to be 46 -- is also the spiritual leader of local extremist network Jamaah Ansharut Daulah (JAD).
Authorities have said JAD was involved in the 2016 Jakarta attack and a recent wave of suicide bombings in Indonesia's second-biggest city Surabaya.
Two families -- including girls aged nine and 12 -- blew themselves up at churches and a police station last month, killing 13.
Authorities have not charged Abdurrahman -- who was already in jail on a separate terror conviction -- over the Surabaya attacks.
Despite being imprisoned since 2010, he has recruited militants to join IS, is thought to have been in communication with leaders of the jihadist group, and is the main translator for IS propaganda in Indonesia, according to analysts and authorities.
Although considered Indonesia's largest pro-IS coalition, JAD's structure and links to the network are murky.
The Institute for Policy Analysis of Conflict has said JAD is "a generic term" used for any IS supporter and functions more as an umbrella organisation than a coherent group.
Formed in 2015, JAD is thought to be composed of some two dozen Indonesian groups that have pledged allegiance to IS leader Abu Bakr al-Baghdadi, according to the US State Department, which last year designated it as an extremist network.
Apart from the 2016 Jakarta attacks, JAD carried out suicide attacks the following year which killed three policemen and injured a dozen others at a busy bus station in Jakarta.
It has also been linked to a series of other plots including a firebomb attack on a church that killed a toddler and a plan to launch a Christmas-time suicide bombing. This was foiled when the militants planning the attack were killed.