Defence lawyers can be barred from a judicial hearing in which the identity of a secret informant would come out, the Supreme Court of Canada has ruled.

The 7-0 decision overturns a ruling from the British Columbia Court of Appeal, which upheld a lower-court decision to allow defence lawyers to attend the hearing.

The decision is a blow to the defence in the B.C. legislature raid case, which has been dragging through the courts for five years.

Udhe Singh (Dave) Basi, Bobby Singh Virk and Aneal Basi were charged with corruption, fraud and breach of trust over the sale of B.C. Rail in 2003.

Dave Basi and Virk are former ministerial aides in the provincial Liberal government and Aneal Basi is a cousin of Dave Basi and is alleged to have laundered money.

Defence lawyers demanded disclosure of certain information which the Crown claimed was protected by what is known as "informer privilege."

The Crown asked for a private hearing over its privilege claim, and wanted the defence excluded because the identity of the informant was bound to be disclosed.

Judge Elizabeth Bennett ruled the defence could be present for the hearing, but the country's highest court said that was a mistake.

Although Bennett ordered the defence to keep quiet about what went on at the hearing, Justice Morris Fish, in his written decision, said that's not good enough.

"The order exposed the privilege to imminent demise, since information tending to reveal the identity of the putative informer was bound to be revealed in the course of the hearing," he wrote.

"Defence counsel would thus have been made privy to what the informer privilege is meant to deny them."

Special prosecutor Bill Berardino said the high court's ruling affirms important legal principles relating to the law of informer privilege, which he thought were at stake during the Bas-Virk case.

"The Crown took that appeal because it determined that it had a mandatory legal duty to protect the privilege," he said.

"When you have your position confirmed you're now able to carry forward with this case and that's what we propose to do."

Berardino said although there was much speculation the Crown would drop the case if it lost at the Supreme Court, he never doubted informer privilege would be upheld.

"We have from the very beginning in terms of our legal analysis is that the position we've taken has been a correct position in law and therefore we never thought we would have to discontinue the case," he said.

The case, which has been mired in pre-trial disclosure hearings for years, will continue with more submissions next week or the week after, Berardino said.