JAKARTA, Indonesia — An Indonesian court sentenced an Islamic militant to 10 years in prison on Tuesday after finding him guilty of procuring weapons for his network to use in attacks.

The defendant, Suryadi Mas’ud, was arrested in March along with three other suspected militants who according to police were trying to establish a jihadist training camp in eastern Indonesia.

In its verdict, a three-member panel of judges at the West Jakarta District Court said Mas’ud was guilty of an “evil” conspiracy to carry out terror acts. The panel also ordered Mas’ud to pay a fine of $3,700 or serve six more months in jail.

The 45-year-old Mas’ud, who uses several aliases, raised a finger and shouted “Allah Akbar,” or “God is Great,” after the verdict was read.

Police said the four suspects, arrested in several locations on Java Island, were connected to four militants ambushed by police on the same day near Jakarta, where one was fatally shot.

Police said all eight were members of Jemaah Anshorut Daulah, a network of Indonesian extremist groups formed in 2005 and led by imprisoned radical cleric Aman Abdurrahman that pledges allegiance to Islamic State group leader Abu Bakr al-Baghdadi.

Mas’ud told police he had traveled to the Philippines several times to purchase M16 and M14 rifles as well as pistols from militants there.

At least five guns were sent from the Philippines, including two that were used in a Jakarta suicide bombing and gun attack in January 2016 which killed eight people including four attackers, police said.

Mas’ud told the court that he did not know where the weapons were used.

Indonesia, the world’s most populous Muslim country, has waged a sustained crackdown on violent jihadis since the 2002 Bali bombings by al-Qaida-affiliated radicals that killed more than 200 people, mostly foreigners. A new threat has emerged in the past several years from IS sympathizers.

Police said the group was planning to establish a new jihadist training camp in Halmahera, the main island in North Maluku province, which is relatively close to Abu Sayyaf militants in the southern Philippines. It was planned after IS-affiliated militants based in Poso in Central Sulawesi were decimated by months-long police and military attacks that also killed their leader, Abu Wardah Santoso.

The judges said money used by Mas’ud to buy the weapons came from Iwan Darmawan, alias Rois, who is serving a sentence on the prison island of Nusa Kambangan in Central Java. They said Mas’ud received $23,210 through Darmawan’s brother, Adi Jihadi.

“You must repent, because it’s going to be doomsday,” Mas’ud told reporters as he left the courtroom.

Verdicts are expected for the three other suspects on Wednesday.