An urgent push by Attorney-General Mark Dreyfus to continue restrictions on convicted terrorist plotter Ibrahim Ghazzawy following his release from jail has failed.
Lawyers for Mr Dreyfus's office appealed in the NSW Supreme Court to place a 12-month extended supervision order on Ghazzawy, who spent eight years in jail after pleading guilty to a terror offence in 2015.
The order would have placed the 28-year-old under ongoing supervision and restrictions, including limiting who he has contact with.
Ghazzawy's sense of grievance with authorities, susceptibility to influence and close ties with other convicted extremists, all formed part of the prosecution's argument during a two-day hearing last week.
In delivering his ruling on Thursday, Justice Richard Button said since being released Ghazzawy has been "constructive and compliant".
"For a significant portion of his time in custody he was an angry, embittered young man," Justice Button said in a written judgment.
"Later, there was a mellowing, and a readiness to accept rehabilitative measures, including regarding deradicalisation."
The attorney-general has also been ordered to pay Ghazzaway's legal costs.
Ghazzawy was convicted as part of the "Khalid Group" in 2015, when he was aged 19, along with then 22-year-old Sulayman Khalid.
Members of the group met at Khalid's home in western Sydney to discuss engaging in extremist activities, with a 2014 raid on the property uncovering a joint document outlining ways of committing a terrorist attack in Australia.
Writing attributed to Ghazzawy included plans to attack AFP headquarters and the main gates of Lithgow jail, and carry out a partisan war against the Australian government while hiding out in the Blue Mountains.
Ghazzawy pleaded guilty to crafting documents planning terrorist attacks and was sentenced to eight years in jail.
Upon his release in December, the attorney-general successfully imposed an urgent interim supervision order on Ghazzawy, limiting his movements and interactions, which expires on Friday.
When he was 18-year-old, authorities seized and later cancelled Ghazzaway's passport over concerns he planned to travel to Syria to join and fight with ISIS.
He maintains he was only ever intending to take a holiday in Morocco with a friend and has claimed in the past he was racially and religiously profiled.
Ghazzawy held a "sense of simmering anger" over his treatment at the time and had expressed a belief he was driven to offend by that treatment, prosecutor Tim Begbie KC told last week's hearings.
For the first six years of his sentence, Ghazzawy was held in the notorious High Risk Management Correctional Centre at Goulburn jail, putting him in close contact with many of the country's most serious offenders.
"Many, if not most, of the other prisoners in the centre were also persons accused or convicted of terrorist offences that were motivated by Islamic extremism," Justice Button said in his judgment.
While in custody, Ghazzawy exchanged letters with "very serious terrorist offenders" with whom he was incarcerated, Mr Begbie told the court.
Forensic psychiatrist Kerri Eagle said his association with others serving time for similar offences was part of Ghazzawy's "identity" and was likely only strengthened by what they faced together in prison.
"It's how he gets his self-worth and value," Dr Eagle told the court last week.
"Putting people in jail with other people of similar problems and concerns can make that an even greater problem.
"That's very difficult to let go of."
Dr Eagle also told the court said Ghazzawy "still has clear animosity towards police" but was more likely now to act "passively aggressively", rather than overtly aggressively or violently.