Two Australians suspected of terrorist activities will have their citizenship reinstated after the High Court found powers used by the former home affairs minister to cancel it were unconstitutional.
Turkish-Australian Delil Alexander, 35, is in jail in Syria after his Australian citizenship was removed on July 2 last year.
The identity of the second person is unknown.
Alexander's lawyers argued the Sydney-born man is in danger of "serious human rights violations" including torture.
A majority of the High Court found on Wednesday the citizenship stripping powers legislated by the coalition government were invalid on the basis that it gave the minister "the exclusively judicial function of adjudging and punishing criminal guilt".
In 2018, Labor criticised the law change as likely to be found to be in breach of the constitution.
Two judges found the laws had a "punitive character", conferring power on the minister "to cease citizenship as a sanction for past conduct, akin to historical forms of punishment, with significant consequences for the individual", a summary of the judgment said.
However, it was found the section of the Citizenship Act giving the minister the power was supported by the constitution's "aliens power".
Four judges - Chief Justice Susan Kiefel, Patrick Keane, Jacqueline Gleeson and James Edelman - said part of the relief granted to the plaintiff should be a declaration he is an Australian citizen.
Justice Simon Steward said in his judgment the laws were valid, as there were sufficient safeguards in place.
"(The section) was thus enacted, not as a punishment for a crime, but as a 'political precaution'," he wrote.
It is understood Alexander and the other person will have their citizenship restored, but the decision will not impact on people held onshore.
Attorney-General Mark Dreyfus said in a statement he and Home Affairs Minister Clare O'Neil would examine the judgment and its implications in detail.
But he noted there was "no threat to Australia as a result of the decision".
"The Australian government has a range of measures available to manage the risk posed to Australians by individuals offshore including the temporary exclusion order regime which can prohibit an individual returning to Australia for up to two years," he said.
Alexander left Australia for Turkey on April 16, 2013, but just over two weeks later he was married in Syria.
ASIO assessed he joined terrorist group Islamic State by August 2013 - a qualified security assessment over which he has sought judicial review.
In November 2017, he was arrested by Kurdish militia in a place in Syria which was not a declared area under Australian terrorist laws.
Alexander was transferred to Syrian custody and given five years in jail for "unspecified offences under the Syrian Penal Code".
He was pardoned in June last year, having served 18 months of his term.
Shortly after he was pardoned, the ASIO director-general provided classified advice to the then home affairs minister which did not recommend citizenship cancellation, the court heard.
However, the minister Karen Andrews stripped Alexander's citizenship in July 2021.
Since then, he has been in Syrian intelligence custody and his family and lawyers have been unable to contact him, leading to his sister Berivan having to launch the legal action as a "litigation guardian".
Government lawyers argued the minister met the three required conditions in the decision: a person has engaged in the requisite conduct; the conduct demonstrates the person has repudiated their allegiance to Australia; and it would be contrary to the public interest for them to remain an Australian citizen.
Former attorney-general Christian Porter, in introducing the changes in 2018, argued stripping Australian citizenship of people who sought to do the nation harm was an "an integral part of our ongoing response to international violent extremism and terrorism".