VANCOUVER -- Two people found guilty of terror charges will walk free after a British Columbia Supreme Court judge ruled they were entrapped by the RCMP in a police-manufactured crime.

Justice Catherine Bruce said police instigated and skillfully engineered the very terrorist acts committed by John Nuttall and Amanda Korody, who believed they were planting pressure-cooker bombs that would blow up at the legislature on Canada Day in 2013.

"The world has enough terrorists. We do not need the police to create more out of marginalized people," Bruce said in a landmark ruling Friday.

"The defendants were the foot soldiers but the undercover officer was the leader of the group," she said.

"Without the police it would have been impossible for the defendants to carry out the pressure-cooker plan."

Bruce said RCMP officers overstepped their authority during a months-long, undercover sting and their actions were egregious.

"The police decided they had to aggressively engineer and plan for Nuttall and Korody and make them think it was their own," she said.

"To say they were unsophisticated is generous," she said, adding there was no imminent threat to the public from a pair who demonstrated they were not intelligent but naive.

A jury found Nuttall and Korody guilty in June 2015 of three terrorism-related charges, but Bruce delayed registering the convictions at the request of defence lawyers, who wanted to argue the Mounties had entrapped their clients.

An entrapment finding means Bruce will issue a stay of proceedings, which throws out the jury's guilty verdict.

It won't appear on any criminal record and can't be used against the couple in the future. Had they been convicted, Nuttall and Korody would have a maximum sentence of life in prison. Korody's lawyer, Mark Jette, said outside the court that the couple should be released from jail on Friday.

A stay of proceedings has the same end result but is different than an acquittal, which is a finding of not guilty.

This is the first time in Canada that the legal defence of entrapment has been successfully argued in a terrorism case. Three previous attempts failed.

Nuttall and Korody's lawyers argued their clients would not have planted the inert bombs were it not for the involvement of the RCMP.

Defence lawyers highlighted instances where undercover officers encouraged the couple to follow a quicker timeline or to opt for a more realistic terrorist plot and abandon earlier, less feasible plans such as taking a passenger train hostage or hijacking a nuclear submarine.

Both Nuttall and Korody were especially vulnerable to manipulation, their lawyers said, describing their clients as poor, methadone-dependent, former drug addicts living in relative isolation.

The Crown alleged the couple believed they were working with authentic, terrorist connections, played by undercover officers, in order to access deadly explosives and carry out an attack.

Hours of covert audio and video recordings of Nuttall and Korody were played during the earlier trial, including one that showed the pair filming a jihadist video they intended to release after the attack.

Other recordings played in court showed Nuttall and Korody saying that killing women and children as collateral damage was acceptable, provided they weren't explicitly targeted in an attack.

Throughout the surveillance, Nuttall said his motivation for the attack -- which he hoped would kill hundreds -- was to avenge Canada's treatment of Muslims in the Middle East.