Updated

Six Islamic militants accused by Indonesian police of plotting to fire a rocket at downtown Singapore from a nearby island were sentenced to prison on Wednesday on charges of harboring and training extremists.

Judge Tarigan Mudalimbong said there wasn't enough evidence to prove the rocket plot.

Instead, the court found the men guilty of violating Indonesia's anti-terrorism law by hiding two Chinese Uighurs (pronounced WEE-gurs), who were trying to join an extremist group in Poso on the Indonesian island of Sulawesi, and by setting up a jihadi training camp.

The group's leader, 32-year-old Gigih Rahmad Dewa, was sentenced to four years in prison and the other men were each sentenced to three years.

Mudalimbong said the defendants' actions were an "inexcusable attack on society."

The six men were arrested last year on Batam island, about 25 kilometers (15 miles) southeast of Singapore.

Police said instant messaging chats between them and Bahrun Naim, an Indonesian fighting with the Islamic State group in Syria, indicated they wanted to fire a rocket at the predominantly Chinese city-state. But police failed to establish the plan was more than talk.

Naim has been linked to numerous plots and attacks in Indonesia, including a May 24 double suicide bombing in Jakarta that killed three police officers and the two bombers.

Mudalimbong said the six men had pledged allegiance to Islamic State group leader Abu Bakr al-Baghdadi and set up a jihadi training camp in Batam in an attempt to expand their extremist group, which was known as Katibah Gonggong Rebus.

Police were tipped to the whereabouts of the militants on Batam by another Chinese Uighur who had been arrested on suspicion of plotting to attack Jakarta's minority Christian governor and minority Shiite Muslims.