The Australian Federal Police (AFP) raided the cell of a secret prisoner and his brother's Melbourne home to seize a manuscript he penned while locked up in Canberra's jail.

Key points: A man convicted of secret Commonwealth offences was asked by authorities to write a manuscript to improve his mental health

A man convicted of secret Commonwealth offences was asked by authorities to write a manuscript to improve his mental health When a new chief took over the prison, she alerted federal police to his writings, though she had not read them

When a new chief took over the prison, she alerted federal police to his writings, though she had not read them The prisoner took legal action against her decision, which sparked raids and the loss of his email privileges

Information about the man emerged in an ACT Supreme Court judgment after he challenged the prison chief's decisions to tell police about the manuscript and to withdraw his privileges.

The decision, handed down on November 8, outlines some of the unusual and mysterious circumstances surrounding the man, known by the pseudonym Alan Johns.

The offences Johns had committed and the Commonwealth orders made about his case were so secret that senior jail officials and even the prisoner himself were unaware of their full details.

However, prison staff knew that the orders outlawed sharing information about Johns.

The jail, Canberra's Alexander Maconochie Centre, was to report anything that might risk a breach of the orders to the AFP, which supervised the orders, including unusual visitors or callers.

Therapy writings sparked raids

In September 2018, while locked up, Johns was encouraged to write three manuscripts over a six-month period as part of his mental-health recovery plan.

He wrote two novel-length manuscripts in his cell on the prison's computers: one an alternative-history fiction and the second a memoir exploring his time in jail.

Alexander Maconochie Centre officials were not aware of the detail of the man's crimes. ( ABC News: Alkira Reinfrank )

The jail's general manager, Corinne Justason, called the AFP after Johns asked whether a Canberra-based author could visit him to discuss options about publishing his memoir. Johns said he had assured Ms Justason that the memoir did not include details of his crimes.

Federal police raided the Melbourne home of Johns's brother in February this year, seizing all copies of the memoir that the prisoner had emailed for him to read.

At the same time, the prison froze Johns's email access and only reinstated it two months later.

Days after raiding his brother's home, the AFP raided Johns's jail cell and confiscated copies of his memoir and other writings. Officers later searched the prison's email server.

Lawsuit against prison

Johns took legal action over the incident, seeking a judicial review of Ms Justason's decision to inform federal police of the manuscript and to withdraw his privileges.

He asked the ACT Supreme Court to lift the restrictions on his email access.

In his judgment, Justice John Burns outlined Johns's claims that the jail's previous general manager had read and had no issue with his writings, and had wished Johns luck when told he wanted to publish his memoir.

The court heard all detainees could access the jail's email system, which is owned by the ACT Government and operated by prison staff.

When detainees first enter custody they are given a personal email account that is monitored by authorities.

The court heard emails that contained attachments were quarantined and read by staff to check the contents were not offensive, disclosed the commission of an offence or otherwise posed a risk.

Johns had sent the memoir to his brother via the jail's email system.

He argued he had done nothing to justify punitive action against him and was distressed that Ms Justason provided information to the AFP that caused the raids and email restrictions.

Judge backs prison chief

The man took legal action against the prison chief's decision to tell police about his memoir. ( ABC News: Ian Cutmore )

Justice Burns noted Ms Justason was aware of the existence of several orders made under Commonwealth laws that applied to the prisoner. While she did not know the specific orders, she was aware that disclosing information about the man and his crimes was prohibited.

She also said she was unaware whether her predecessor had read the manuscript or was himself aware of the Commonwealth orders in place.

The judge found that sharing the information with the AFP was not prohibited and was motivated by Ms Justason's desire to ensure that the Commonwealth orders were not breached or an offence committed.

"I am satisfied that by providing the manuscript to the AFP, Ms Justason was not in breach of any statutory obligation owed by her, or owed by the [prison]," the judge wrote.

"It was not for Ms Justason to determine whether any of the material in the manuscript breached, or may have breached, those orders. She was hardly in a position to do so."