"The applicant has challenged the cancellation of a New Zealand passport."
Justice Venning said the act allowed closed-court hearings when classified security information was involved and the hearings had to be held without the person the case was about, their legal representatives and the public. However, he added that it should have been on the court's daily list.
"The court has appointed special advocates to assist with issues that have to be dealt with in the absence of the applicant," he said.
The rare move to hold the closed-doors hearing only applies in "the narrow circumstances prescribed by the act", the judge said.
"It is a statutory exception to the principle of open justice, which the court is obliged by the legislation to observe."
Justice Robert Dobson is presiding over the case, but no date has yet been set for the substantive hearing.
"The eventual outcome will be made available publicly in an appropriate form," Justice Venning said.
When can a courtroom be cleared of the public and press?
Judges will often clear the public from a courtroom during proceedings to sit "in chambers", often to discuss relevant aspects of the law. Only legal counsel, the parties, a police officer in charge of a case and the media can stay.
The Criminal Procedure Act (CPA) also says courtrooms are to be cleared when a complainant gives evidence in cases of a sexual nature.
Otherwise, the act limits a judge's powers to clear a courtroom of the public to preserve open justice.
Under section 197 of the CPA, a judge can remove the public if it is necessary to avoid undue disruption to the proceedings; is prejudicing the security or defence of New Zealand; is a real risk of prejudice to a fair trial; is endangering the safety of any person; is prejudicing the maintenance of the law; or if a suppression order is not sufficient to avoid further risk.
Even if such an order is made to clear a courtroom, the verdict or court's decision and sentencing has to be done in public.
The media, however, are exempt from being removed from any courtroom unless the hearing relates to "the security or defence of New Zealand".