An Indonesian court has sentenced an Islamic State group sympathiser to life imprisonment for an attack on a church that killed a two-year-old girl and injured three other children.

The attacker was captured by local resident after throwing a Molotov cocktail at Oikumene Church in Samarinda, the provincial capital of East Kalimantan province on the island of Borneo, in November last year.

The only victims were children playing outside; a two-year-old girl, Ade Intan Marbun, died from her burns, while three others were injured.

The militant, Juhanda, who uses a single name, was previously convicted of terrorism offenses in 2011 but was released from jail in July 2014.

Juhanda was previously convicted of terrorism offenses in 2011. ( ABC News: Ari Firdaus )

During his court appearances, Juhanda was not stopped by court officials from wearing Islamic State symbols on his Muslim head dressing and smiled broadly as the sentence was handed down.

Presiding Judge Surung Simanjuntak at the East Jakarta District Court said there was no reason for leniency because of the defendant's lack of remorse and previous conviction.

"The defendant deliberately attacked the church, although he knew that there were many children in the churchyard," he said.

In a separate trial, Mr Simanjuntak also sentenced four co-conspirators — Supriyadi, Ahmad Dani, Rahmad, and Joko Sugito — to prison terms ranging from six to seven years.

All of the five had pledged allegiance to Islamic State group leader Abu Bakr al-Baghdadi and promised to carry out amaliyah, an Arabic term that is a byword for suicide bombing in militant circles, the judge said.

ABC/AP