Islamic cleric Aman Abdurrahman, right, is escorted by police officers upon arrival for his trial at South Jakarta District Court in Jakarta. Picture: Tatan Syuflana/AP

Jakarta - An Indonesian court on Friday sentenced to death a cleric linked to Islamic State, for masterminding from his jail cell a string of deadly militant attacks across the world's largest Muslim-majority country.

The ruling comes as Indonesia struggles to rein in a rising tide of homegrown militancy, inspired in part by the extremist group Islamic State, with parliament approving tougher anti-terrorism laws last month.

Aman Abdurrahman, 46, is considered the ideological leader of Jemaah Ansharut Daulah (JAD) - a loose grouping of Islamic State sympathizers in Indonesia.

"The court sentences the defendant to death," said the judge, Ahmad Zaini, adding that Abdurrahman had been proved guilty of "carrying out terrorism".

Abdurrahman was convicted of planning a 2016 gun-and-bomb attack in the heart of Jakarta, the capital, that killed eight people, including four attackers. He was serving time in a maximum security prison at the time.

Abdurrahman was also proved to be behind a suicide attack last year that killed three police officers at a Jakarta bus station and the bombing of a church in Samarinda on Borneo island that wounded four children.

The defence team had a week to consider filing an appeal against the ruling, Abdurrahman's lawyer told reporters, but added that the cleric had said he would not appeal, as he did not recognise the Indonesian state and its laws.

Earlier, dozens of masked and heavily armed police officers stood guard as Abdurrahman, handcuffed and wearing an orange prison jacket over a blue shirt and black trousers, was escorted into the South Jakarta courthouse by counter-terrorism officers.

A bomb squad was also on standby. Security experts had raised concerns that a harsh penalty for the cleric could trigger retaliatory attacks by followers.

Suicide bombings last month in Indonesia's second largest city of Surabaya that killed more than 30 people and were carried out by families with young children, were linked to JAD cells and were the country's deadliest in nearly two decades.

The US State Department says the JAD grouping is a "terrorist" organisation linked to numerous attacks.