A convicted terrorist is set to be released into the community after the nation's highest court restored his Australian citizenship and the Commonwealth backed down on keeping him in detention.
The High Court on Wednesday ruled that the home affairs minister's move to strip Algerian-born Abdul Nacer Benbrika of his citizenship was invalid.
In a separate legal case before the Victorian courts, the Commonwealth conceded it could not meet the threshold to keep Benbrika behind bars after he served his sentence.
A continuing detention order allows a person to be kept behind bars after completing their sentence on the basis that they pose an unacceptable risk to the community.
Both parties instead agreed to impose a supervision order, which allows for 24-hour monitoring including close scrutiny of telephone and online communications, friendships and movements.
Benbrika is expected to be freed before the end of the year, after a Victorian judge determines the parameters of the supervision order.
His 15-year sentence was due to end in 2020 but the government was successful in keeping him detained under a continuing detention order, with a court ruling he posed an unacceptable risk to the community.
That order extended his detention until this month.
The push for his deportation has also collapsed after he was found to be an Australian citizen.
The High Court ruled the section of the Australian Citizenship Act that allowed the minister to cancel the citizenship of dual citizens who were serious offenders and had "repudiated their allegiance to Australia" was invalid.
The court determined it was invalid as it allowed the minister to punish criminal guilt, which was an "exclusively judicial function".
The detention of a person was a temporary loss of rights and liberty whereas stripping nationality "is a permanent rupture in the relationship between the individual and the state", the High Court judgment affirmed.
In the 6-1 split decision, Justice Simon Steward disagreed with his colleagues' conclusion, arguing the cancellation of citizenship in cases where a person repudiates their allegiance to Australia was not a form of punishment.
"Rather, cancellation of citizenship is a recognition that by extreme conduct that person has inexorably separated themselves from the people as a community and from Australia itself," he argued.
Benbrika was arrested and convicted over plots to attack Melbourne landmarks in 2005, including the AFL grand final at the MCG.
The self-proclaimed Islamic cleric has also called on his followers to kill at least 1000 non-believers to force the Australian government to withdraw troops from Iraq and Afghanistan.
Home Affairs Minister Clare O'Neil noted the decision, saying the government would examine the judgment and its implications in detail.
The government needed to do everything in its power to keep the community safe, opposition foreign affairs spokesman Simon Birmingham said.
"The Albanese government needs to act with urgency to ensure that this directive can pose no threat to Australia, to ensure his continued detention and to look at whatever means are necessary to keep Australians safe," he said.
The coalition would offer bipartisan support for any measures, including legislation, to keep the community safe, Senator Birmingham said.
Ms O'Neil has flagged new laws to strip dual citizens found to engage in terrorist acts, but says she wants to make sure they're robust enough to withstand a High Court challenge before introducing them.