A court has sentenced the leader of an Islamic State group-affiliated militant network in Indonesia to seven years in prison for involvement in smuggling guns from the southern Philippines.

Presiding Judge Siti Jamzanah said Monday it was proven that Zainal Anshori "committed a criminal act of terrorism." She said he had traveled to a town in Sulawesi closest to the Indonesian border with the southern Philippines to collect a cache of weapons.

Court documents said Anshori also attempted to set up a jihadist training camp.

Anshori was arrested in April, sparking a reprisal attack against police which ended with six militants killed in a gunbattle.

The network he led, Jamaah Anshorut Daulah, is believed responsible for a 2016 attack in Jakarta that killed eight people including the four attackers.