The undisclosed brief of evidence against Witness K and lawyer Bernard Collaery is set to be the subject of a closed court hearing to judge national security information in the prosecution of the pair for disclosing the fact Australia spied on Timor-Leste.

On Friday whistleblower Witness K and Collaery suffered a setback, with the ACT magistrates court refusing their applications to have an earlier open court hearing on whether protected information in the case is likely to prejudice Australia’s national security.

Prosecutors in the case have given notice the crown’s brief of evidence is expected to disclose national security information, and as a result the court and defendants are yet to see the brief pending a decision on how to handle it.

That notice is likely to trigger the attorney general, Christian Porter, to issue a certificate of non-disclosure which leads to a closed hearing for the court to make its own judgment about whether information is likely to prejudice national security.

The chief magistrate, Lorraine Walker, told the court that laws granting a closed hearing could be “clearly potentially prejudicial to the defendants” because lawyers for the defendants “may not be entitled to be present” if they do not have a security clearance.

Lawyers for Witness K have already obtained security clearances in order to learn the identity of the whistleblower, but Collaery’s lawyers including counsel Christopher Ward have not obtained clearances.

The National Security Information Act also provides that the defendants may be excluded from a closed hearing.

Walker noted arguments put on behalf of Witness K and Collaery that a closed hearing would undermine public confidence in the prosecution.

But the chief magistrate concluded that national security legislation “lawfully curtails transparency”. Walker also noted parties could seek a stay if the absence of legal representatives were an abuse of process likely to jeopardise a fair trial.

Walker said there was the “real potential” the brief of evidence – including potentially protected information – would be disclosed if she granted Witness K and Collaery’s applications for an open hearing under section 21 of the National Security Information Act.

The chief magistrate said the notice of expected disclosure of national security information had tied her hands, as section 24(5) of the act requires her to adjourn proceedings until the attorney general’s certificate is dealt with or fails to materialise.

Walker said holding an earlier open court hearing would “undermine” the notice process and would be “illogical” since it deals with the same subject matter.

Walker said she “cannot conclude” that the administration of justice would be harmed by a closed hearing, and noted the court would make its own judgment which could be appealed if the defence argues it is “productive of unfairness”.

Walker noted the commonwealth had given notice of an expected disclosure of national security information to the attorney general on 1 November but had only told the court after hours on Tuesday. She had only learned of the notice on the morning of Wednesday’s hearing.

She said the descriptor used in the notice was essentially “meaningless” to the defence and the court because they had not seen the brief of evidence and did not know which information in it is protected.

Walker intends to hold a three-day hearing on the national security information, with dates to be set after the attorney general issues a certificate of non-disclosure.

Walker granted an application by the ABC and other media to access to a redacted version of the summons, Collaery and Witness K’s section 21 applications and related affidavits.

The Centre Alliance senator, Rex Patrick, told Guardian Australia it would be “highly prejudicial” to have a closed court hearing where Witness K, Collaery and Collaery’s lawyers may not be present.

Patrick said he had “great concern” about Porter’s ability to judge whether disclosure of information is likely to prejudice national security, citing separate incidents where the Senate or the office of the information commissioner had taken a different view to the attorney general.’