It was the social media chatter that gave him away, although changing his profile picture on the Line messaging app to a banner pledging "Indonesian support and solidarity for ISIS" probably didn't help.

Had it not been for all that, Gigih Rahmat Dewa's plot to launch a rocket attack on the city-state of Singapore from a nearby Indonesian island might never have been uncovered.

Gigih, 31, and five accomplices were arrested on the island of Batam on Friday after an investigation showed the degree to which Indonesia's Islamist militants now rely on social media. The attacks were allegedly called for by a Syria-based Islamic State jihadi.