A former Australian intelligence officer's mishandling of classified information had the potential to place people in "quite grave" danger, a judge said while secretly jailing the man.
Four years after the man dubbed Witness J was imprisoned behind closed doors, the ACT Supreme Court released the sentencing judge's remarks on Wednesday.
But significant issues will remain secret, with more than 100 redactions applied to conceal information that includes the five charges Witness J faced.
The name of the Commonwealth agency which previously employed Witness J, also known by the pseudonym "Alan Johns", will also be kept permanently under wraps.
What can be deduced from Justice John Burns' remarks is that Witness J was once "trusted on behalf of the Australian people with highly classified material for the purposes of discharging [his] duties".
At the time of his offending, his security clearance was in the process of being reviewed.
"Undoubtedly, any reduction in your level of security clearance was likely to have a detrimental effect upon your career," Justice Burns told Witness J.
"As someone who had dedicated himself over many years to work [REDACTED] I am sure that you found this [REDACTED] review of your security clearance to be stressful."
Witness J's crimes
Justice Burns said Witness J went on to commit his first offence, described only as communicating information in circumstances that were not permitted.
"Your motive [REDACTED] appears to have been to vent your anger over what you considered to be unfair treatment [REDACTED]," the judge told Witness J.
"You were still angry when you [REDACTED]. I am satisfied that you did so as a lever to persuade those with whom you were dealing to comply with your wishes at that time."
Charge two is even more mysterious, with the redacted remarks revealing only that it involved "a clear risk" of some sort of information being disseminated.
The next offence related to an unspecified publication of material, which Justice Burns accepted was "not intended to be published to the world at large".
However, the judge found there was a risk of "significant detrimental consequences to national security and individuals were that to occur".
The fourth offence was committed in the context of a meeting that was called to inform Witness J his security clearance had been revoked.
"You were told of avenues for review of the decisions but you said you did not have trust in those processes and made comments about the Australian public being best placed to bring to account bad behaviour and cultural issues," Justice Burns said during sentencing.
"You stated that the public has 'a lot of reach'".
Most of the other details about this crime are redacted, but Justice Burns said it involved a risk of third parties obtaining information that "could lead to critical harm to Australia's national security".
Little is also revealed about the final offence, but Justice Burns said Witness J could only have had one reason to commit this unspecified crime.
This was to remind the people he was dealing with that he could "hurt Australia's security interests" by disclosing material in his possession.
'Grave lapse of judgement'
Witness J's barrister at the time of his sentencing, Kieran Ginges, described the former intelligence officer's offending as "a grave lapse of judgement".
Justice Burns accepted the man's conduct had not been malicious in the sense that he had not set out to deliberately harm Australia's national security interests.
"But it was a continuing course of conduct that posed real risks for national security, as well as for individuals," the judge said.
"Some of the risks to individuals had the potential to be quite grave."
Witness J was described as having a long history of employment in high-level security work, which required "an understanding of the need of secrecy".
"I cannot accept that you were unaware of the gravity of your conduct and the risks to national security, as well as the lives and wellbeing of individuals that was inherent in your conduct," Justice Burns told the offender.
"You were grossly reckless in your conduct because of your anger towards what you perceived to be unfair and discriminatory treatment of you."
Canberra's cloak-and-dagger detainee
Witness J pleaded guilty to all charges at the earliest opportunity and was ultimately sentenced to two years and seven months in jail.
While the relevant order appears to have been redacted, a previous judgement revealed he was released after serving 15 months behind bars.
Justice Burns said while Witness J was incarcerated, he had to use an alias and was banned from telling anyone but his brother and uncle he was in jail.
"Even your mother has not been told," the judge said of the time the offender was remanded in custody ahead of his sentencing.
Witness J's imprisonment was so secret not even Shane Rattenbury, the ACT's justice minister at the time, knew about Canberra's unidentifiable inmate.
He only learned of the case when scant details were revealed to the public as a consequence of Witness J taking civil action against ACT prison authorities.
Saga 'should never have happened'
On Wednesday, Kieran Pender, a senior lawyer with the Human Rights Law Centre, said secret court cases had a long history in authoritarian states.
"They have no place in democracies like Australia, where open justice is a fundamental protection of our human rights," Mr Pender told The Canberra Times.
"Today's publication of the Witness J sentencing remarks brings an end to an alarming five-year-long saga that should never have happened."
Mr Pender said it was testament to the media, civil society and the independent national security legislation monitor that this case was identified, called out and now addressed.
"The [federal] government must change the law, pursuant to the monitor's recommendations, to ensure this can never happen again," he said.
"The right to a fair trial is protected in the ACT under the Human Rights Act but this level of secrecy was permitted by federal law, underscoring the importance of a federal charter of human rights."
'Anathema to the rule of law'
Chief Justice Lucy McCallum made the call to release the remarks of the now-retired Justice Burns, describing secrecy as "anathema to the rule of law".
However, she noted the principle of open justice was not absolute.
In cases like this, which was conducted entirely in closed court, Chief Justice McCallum said that principle must give way to the interests of national security.
She ultimately decided a version of the sentencing remarks could be published, describing each redaction as one that was based on "cogent" logic.
Federal Attorney-General Mark Dreyfus KC welcomed the decision to release the sentencing remarks.
"The former government agreed to an unprecedented level of secrecy in the prosecution of 'Alan Johns', resulting in wholly closed criminal proceedings," he said.
"This is not consistent with the rule of law and open justice."