The three boys, detained between April and June, had been "self-radicalized" online, adopting violent extremist ideologies, the Internal Security Department (ISD) said.

They are held under the Internal Security Act, which allows for detention without trial.

One of them, a 14-year-old student, is accused of planning a stabbing attack at his school, the ISD said.

Drawn to the jihadist ideology of the Islamic State group, he allegedly intended to target "non-Muslim teachers and schoolmates" and livestream the attack.

He had initially tried to acquire a gun but dropped the plan because of Singapore's strict firearm laws, and considered making a bomb but lacked the funds for it, the ISD said.