It seems incredible to think the most dangerous terrorist group on Australia's doorstep â" Jemaah Ansharut Daulah (JAD) in Indonesia â" was not even illegal until this week.

But a court decision in Jakarta now not only banned the extremist group, it could also help to make large-scale attacks â" like those in Surabaya and Bali â" much rarer.

It was JAD â" a network of militants that supports the Islamic State group â" that inspired two separate families in Surabaya to carry out a string of suicide bombings in May, killing about 30 people.

The father of one family was later deemed to be the leader of a JAD cell.

Photo: 42-year-old Puji Kuswati poses with her four children. The family were responsible for the Surabaya bombings. (Supplied)

Jemaah Ansharut Daulah (which loosely translates as 'Partisans of the State Group') was already a US-listed terror organisation, and had been blamed for a wave of attacks in Indonesia in recent years, including the 2016 attack at a Starbucks cafe in Jakarta.

But until this week's court ruling, its followers â" estimated to be in the thousands â" were free to communicate, meet, organise, plan and even recruit new members, without necessarily breaking the law.

Video: 11 killed in bomb attacks on chur ches in Indonesia (ABC News)

Even where police or counter-terrorism authorities suspected JAD members of plotting attacks, they were restricted in what they could do to stop them.

Now, a judge at the South Jakarta District Court has agreed to outlaw Jemaah Ansharut Daulah after prosecutors successfully argued supporters had carried out attacks across Indonesia that killed civilians and police.

The ruling was made possible only after Indonesia's Parliament passed recent anti-terror laws to give security forces greater powers against extremist groups. The legislation had been in the pipeline for years, but it took the devastating Surabaya attacks to push it through.

Police given stronger powers to fight extremism

The new laws gave police stronger powers to detain or question people suspected of plotting an attack. They would be allowed to detain suspects for 21 days before they're charged, and a further 200 days after charges are laid, for the purpose of gathering evidence.

It would be naive to think the legislation would stop similar attacks from happening again. But at least one terrorism analyst, Professor Greg Barton at Deakin University, believed it would help to make large-scale attacks much rarer.

"It drives JAD underground effectively," he said. "It means that people who have been openly associated with the group, who have been supporting it financially, have been engaged in propaganda, have been involved in recruitment etc, now face legal action.

"It doesn't make them go away. It doesn't mean their influence has gone completely. But it helps police to constrain how ambitious they can be, and in all likelihood the scale of an attack that they might pull off if they succeed in launching something without being detected."

Photo: Officers block a road following an attack at the local police headquarters in Surabaya, East Java, Indonesia. (AP: Achmad Ibrahim)

At the same time, banning the jihadist group could serve to bolster its reputation, and in turn boost its membership.

"It amplifies their reputation â¦ 'look at us, we've just been banned by the Indonesian authorities'," the Australian Strategic Policy Institute's Isaac Kfir said.

"If people in or outside Indonesia are interested in the group, [the ban] might encourage them to start looking at videos and its online presence, and that might create a backlash."

Hands tied when trying to stop suicide bomber

In one of the suicide attacks in Surabaya â" against the city's police headquarters â " the father who brought his family on motorbikes to blow themselves up had raised police suspicions after visiting terror convicts in a nearby jail, according to one community leader.

Police had later paid a visit to the family. But without any other evidence or warning signs, they were unable to do much more. When the attacks happened, police were as shocked as the family's neighbours, who had no suspicions at all.

Professor Barton believes the new legislation â" and the ban on JAD â" will make it harder for jihadist groups to organise.

"What we saw in Surabaya was a couple of close-knit family cells that were flying below the radar, who managed to launch attacks without detection," Professor Barton said.

"Police had not identified the level of threat that was there, presumably because [the cell members] weren't communicating broadly beyond themselves, so [police] were not picking up intelligence intercepts that gave the game awa y.

"And that in a way is a sign of an effective counter-terrorism campaign in Indonesia over two decades - that these groups have been forced to become very secretive, and not communicate broadly.

"But it seems likely if police could move freely against JAD networks they would have caught up with those families well before they did what they did."

Increasing police powers to fight terrorism can work

Professor Barton likened the new legislation in Indonesia to laws Australia introduced in 2014 to ban jihadist recruits from travelling to Syria or Iraq to fight alongside Islamic State. Similar legislation introduced in Europe also constrained what such groups could do.

"There has been broad success in Western democracies arguably in stopping major attacks like 9/11 or the London transport system attack in 2005, or the attack in the Madrid train network the year before," he said.

"We haven' t seen a repeat of those attacks. We did have the awful spectre of the Manchester attack and a series of smaller attacks in the UK last year.

"But effectively, counter-terrorism operations have so constrained large networks, that they don't get a chance to put together a large-scale sophisticated plot.

Photo: The wreck of the Number 30 double decker bus, destroyed by a suicide bomb in the 2005 London terror attacks. (ABC TV)

"And that's been true of Indonesia as well.

"This is just another incremental move down the track to constraining what these groups can do."

An estimated 500 Indonesians have returned home from Iraq since Islamic State was largely ousted from Syria and Iraq last year. Another 600 or more were still believed to be in Turkey, waiting to return home.

Many were believed to be members or supporters of JAD or its many affiliate groups. The group's founder, radical cleric Aman Abdurrahman, was sentenced to death last month for inciting attacks including the 2016 Starbucks bombing.

JAD and its member groups have served to fill a vacuum created after Jemaah Islamiah was banned in 2008. JI was the organisation that inspired those militants who carried out the Bali bombings of 2002 and 2005.

Photo: Indonesian extremists went to Afghanistan to fight with the Mujahideen against Russia. (Wikimedia: E Kuvakin)

Professor Barton said it w as inevitable if JAD was slowly snuffed out of existence, other extremist groups would take their place. He pointed to Darul Islam (DI), arguably Indonesia's first major jihadist group that was crushed in the 1950s and 1960s, and its leaders executed.

Decades later, family members linked to DI went to Afghanistan to fight with the Afghan Mujahideen. In 1993 some declared themselves part of a breakaway group â" Jemaah Islamiah.

Even today he said some of the many hundred Indonesians who fought with ISIS in Syria and Iraq were also from families connected to the Darul Islam network.

"It's an example where outlawing a group doesn't make it disappear, or stop the inter-generational transfer," Professor Barton said.