A political stoush is brewing over expanding a detention regime that keeps terrorist offenders behind bars to also cover recently released immigration detainees.
New laws would extend the preventative detention regime in place for terrorists that allows people to be detained after completing their sentence if they're deemed a risk to the community.
It's an attempt to lock up some of the recently released detainees after the High Court ruled indefinite immigration detention was illegal.
The government will introduce the legislation this week and the principle is supported by the opposition.
Labor frontbencher Murray Watt said the laws would be robust and legally sound after the High Court's ruling.
"What we want to make sure is that the worst of the worst of these people who've been released into the community are detained but that's done so in a constitutional way that stands up in court," he told Sky News on Sunday.
The current regime only applied to "a fairly small number" of people as it was focused on those who were the greatest risk to the community and the new laws would do the same, he said.
"That decision ultimately will need to be made by the court," he added when asked how many of the more than 140 released detainees the laws would cover.
Opposition immigration spokesman Dan Tehan said the detention regime needed to be as strong as possible and apply to as many detainees as possible.
Mr Tehan also called for the government to re-engage with third countries to take members of the cohort.
"The High Court has made it clear, if there are real prospects that these people can be removed overseas, they can be detained," he said.
"So we want tough preventive detention laws and we want the government to get going again on trying to find countries to deport these detainees to."
But the former Independent National Security Legislation Monitor Grant Donaldson has criticised the push, according to the Sydney Morning Herald.
Mr Donaldson, who finished his term last month, said he couldn't understand how the scheme could apply to people who had finished their prison sentences a long time ago.
He said the push was a disgrace and a shame to both sides of politics and chastised Labor and the coalition for creating unwarranted fear and hysteria.
Greens senator Sarah Hanson-Young said the government's handling of the ordeal had been appalling after failing to adequately draft laws and whipping up fear.
"This is knee-jerk, hysteria policymaking, it's a moral panic that's been designed," she told the ABC's Insiders program.
"There is a race to the bottom here, this is all about making refugees and migrants a group in our community that people are afraid of."
She also branded the debate about immigration policy revolting, dangerous and a risk to social cohesion.