Photo: CTV John Nuttall and Amanda Korody

There is evidence the RCMP broke the law while conducting a high-profile terrorism sting and must hand over confidential legal documents, says a B.C. Supreme Court judge.

Justice Catherine Bruce has not yet ruled whether the RCMP entrapped John Nuttall and Amanda Korody into plotting to blow up the B.C. legislature in 2013, but she said in a ruling released Wednesday that the Mounties may be guilty of knowingly facilitating a terrorist act.

"In my view, the defence have raised at least a prima facie case that the RCMP officers involved in Project Souvenir were engaged in unlawful acts during the undercover operation," wrote Bruce, referring to the operation by its code name.

"There is a sufficiently close link between the illegal acts committed by the RCMP and the prosecution of the accused to support an abuse of process claim."

Nuttall and Korody were found guilty earlier this year of planning to detonate homemade pressure-cooker explosives on the grounds of the provincial legislature during Canada Day celebrations two years ago.

Their lawyers are asking the court for a stay of proceedings for reasons of entrapment, arguing the RCMP manipulated the pair into carrying out the bomb plot, which they say would never have happened without extensive help from the police.

Over the course of the investigation, undercover officers posing as jihadi warriors gave Nuttall and Korody groceries, cigarettes, bus passes, cell phones, phone cards, clothing, cash and a portable hard drive.

They also provided the pair with a place to work on their terrorist scheme and a location to build the explosives, chauffeured them to various stores to purchase bomb-making equipment and transported them to and from Victoria and around the Lower Mainland over the course of the four-month sting operation.

Bruce's ruling ordered the police to disclose confidential legal advice they received about running the undercover affair, but added that she would vet the documents before releasing them to defence.

Communication with a lawyer is normally protected under solicitor-client privilege, but Bruce said the Mounties waived that right by willingly disclosing a portion of that information in court.

"These disclosures were not only contained in officers' notes, but were included in the minutes of the briefing meetings held by the command team and the undercover (operators). These meetings were attending by the highest ranking officers involved in Project Souvenir," wrote Bruce.

"They provided key insight into the state of mind of all the officers involved in the undercover operation."

The ruling revealed that lawyers had advised the RCMP on numerous occasions, including recommending officers "drive target but don't shop" when purchasing materials to build the explosives.

While finding that the police acted illegally may not be enough to warrant an acquittal, evidence that the police ignored legal advice relates to "the seriousness of their misconduct" and is relevant to whether a stay of proceedings should be ordered, wrote Bruce in her ruling.

Whether the Mounties followed the legal advice matters because it may show the officers acted in bad faith, she said.

Bruce noted that the Crown had not objected to some legal advice being disclosed before the court, so ruled that to allow prosecutors to rely selectively on otherwise-confidential legal opinions would "give the Crown an unfair advantage."