Key parts of former ACT attorney-general Bernard Collaery's trial will be conducted in secret, but exactly how much remains unclear.
His legal team intends to appeal Friday's ACT Supreme Court ruling, which prompted a warning that "restrictive" laws designed to protect Australians from terrorism could instead be eroding open justice
Mr Collaery, 75, is pleading not guilty to charges that he breached national security laws by revealing Australian Secret Intelligence Service information and that he conspired with his former client, the ex-spy known as Witness K, to do so.
The information was that Australian spies bugged a government building in East Timor to gain the upper hand in sensitive negotiations over oil and gas reserves.
Witness K also faces charges and the former spy's lawyers have said he intends to plead guilty.
Mr Collaery's case was discussed behind closed doors last month in a pre-trial hearing.
The hearing was necessary because Commonwealth Attorney-General Christian Porter had issued a certificate to shield from the public evidence that he considered to be of national security importance.
Mr Collaery did not agree on the issues Mr Porter wanted to keep secret, meaning it was left to a judge to decide which aspects of the trial, if any, should be dealt with in closed court.
On Friday afternoon, Justice David Mossop made a ruling upholding the Attorney-General's certificate, meaning certain evidence must remain classified during the trial.
But how much remains unclear because the judge will not publish his reasons until there has been another hearing to determine the level of detail that should be redacted from those reasons.
Christopher Flynn, a lawyer for Mr Collaery, said outside court that an appeal would be lodged.
"This hearing was all about whether Bernard Collaery will get an open trial or a secret trial," Mr Flynn said.
"The Commonwealth asserts that it has never confirmed or denied whether there was an espionage operation in East Timor.
"However, any trial of Mr Collaery requires the Commonwealth to confirm or deny the truth of what was publicly alleged by him in many interviews for which he is now being prosecuted."
Mr Flynn said it was very disappointing that essential elements of the trial would not be heard in public.
"Open justice is an essential part of our legal system, the rights of defendants and of our democracy," he said.
"This case should be heard in public. Highly regarded people with the highest levels of experience in foreign policy and security agree.
"The view that national security needs this trial to be secret is hotly contested, even here in Canberra."
Mr Flynn said that during the pre-trial hearing, the court had heard evidence from a range of prominent people in support of Mr Collaery.
They included former foreign minister Gareth Evans, former Defence Force chief Admiral Chris Barry, and ex-diplomat and ambassador to Indonesia John McCarthy.
Former judge Anthony Whealy, an expert in national security law, also gave evidence for Mr Collaery, as did ex-East Timorese presidents Xanana Gusmao and Jose Ramos-Horta.
"That strong evidence was not enough in the face of our restrictive laws that place a premium on security and secrecy over all other considerations," Mr Flynn said.
"Laws designed to protect Australia from terrorism should not be used to close courts in this kind of case.
"What a shame it would be for Australians if laws that were meant to defend and protect us ended up eroding the very things that we mean to protect and defend."
Friday's ruling follows the federal government revealing it has already spent more than $2 million of taxpayers' money on the prosecutions of Mr Collaery and Witness K.
In answer to a question on notice, published on Thursday, Mr Porter said that as of June 3 the Commonwealth's external legal costs had reached about $2,063,442.86.
ACT Law Society president Chris Donohue questioned whether this was money well spent.
"It's an astonishing amount of money and the federal government has to consider what it actually wants to achieve from this," he said.
The amount already forked out during the preliminary stages of prosecuting Mr Collaery and Witness K represents almost one-third of the $6.5 million legal bill the ACT government incurred for the entirety of the complex David Eastman retrial. That case included pre-trial proceedings and a five-month trial.