Image copyright EPA Image caption The Indonesia cleric is considered to be the de facto head of IS supporters in the country

An Indonesian cleric found guilty of masterminding a 2016 terror attack in Jakarta which left four civilians dead has been sentenced to death.

Aman Aburrahman was convicted of planning the attack which saw a suicide bomber blow himself up at a Starbucks.

The cleric, who had declared his support for the Islamic State (IS), is also the spiritual leader of a local extremist network.

The 2016 attack was the first linked to IS in Indonesia.

Aburrahman, 46, has been in prison since 2010 but the court heard he planned the attacks from his jail cell.

The attack saw a series of explosions hit the capital, with the Starbucks and a police security post among those hit by the blast.

The blasts centered around a major shopping and business district, close to foreign embassies and United Nations offices.

Gunmen were also holed up in the complex that housed the Starbucks, and gunfire was exchanged when police arrived.

Two attackers were killed in the shootout and two others blew themselves up.

Image copyright Getty Images Image caption It was a scene of chaos in downtown Jakarta when gunfire and bomb explosions hit the city

The judge said in the sentencing on Friday that Abdurrahman had been proven guilty of "carrying out terrorism".

Abdurrahman had pleaded not guilty, saying he had inspired his followers to travel to Syria to fight with IS but had had not ordered attacks in Indonesia.

He is the spiritual leader behind the Indonesian-based Jemaah Ansharut Daulah (JAD) military group, which had previously pledged allegiance to IS, and considered to be the de facto head of IS supporters in Indonesia.

Indonesia, the world's largest Muslim-majority country, has suffered militant attacks in the past but this was the first claimed by IS.

In June, a cluster of suicide attacks in Surabaya saw churches and police headquarters targeted.

At least 11 people died in an attack on three churches, making it the deadliest incident since 2005, when 20 people died in the Bali bombing.

The churches attack was carried out by a family of six - including two girls ages nine and 12.