T he attempt by undercover RCMP officers — encouraged and instructed from senior levels — to lure a pair of hapless Vancouver-area layabouts into a contrived plot to bomb the B.C. buildings was a debacle. From start to finish.

That’s putting it mildly. B.C. Supreme Court Justice Catherine Bruce described it best.

She pulled no punches while reading her long-awaited decision Friday in a downtown Vancouver courtroom. After listening to arguments made over the past 12 months, Bruce had to determine whether the Mounties had entrapped John Nuttall and his common-law wife, Amanda Korody.

Both were unemployed and dope-sick, living hand to mouth in a basement apartment they could barely afford and which they rarely left.

In her scathing hour-long delivery, a highlight-reel summary of her 210-page written judgment, Bruce denounced the RCMP’s actions and the undercover sting operation they hatched. “This was a clear case of policemanufactured crime,” the judge declared.

The Mounties unfairly snared the pair, in what Bruce described as an “offensive” and “illegal” abuse of process.

“I find that the RCMP knowingly facilitated a terrorist activity by providing money and other services to the defendants that helped and made easier the terrorist activities,” she said.

“The spectre of the defendants serving a life sentence for a crime that the police manufactured by exploiting their vulnerabilities, by instilling fear that they would be killed if they backed out … is offensive to our concept of fundamental justice.”

She entered a stay of proceedings and ordered the couple released from custody. Nuttall and Korody had been behind bars since their arrest more than three years ago. Now their convictions of last year were overturned and they were free. They left the courtroom separately but were seen downstairs a few minutes later, embracing.

But after little more than an hour, they were arrested by Vancouver police, handcuffed and taken to a station, while their lawyers appeared in a provincial courthouse to try to arrange for their release, according to the Vancouver Sun. The Crown has applied for a peace bond, a court protection order requiring the couple to be on good behaviour. The pair could be held in custody until that matter is settled.

Later Friday, it was reported the Crown has filed an appeal of Bruce’s decision.

The stay of proceedings was a startling — though not surprising — reversal of fortune, a rational and sane conclusion to an astonishing series of police and prosecutorial missteps and poor decisions, starting in 2012. Those errors in judgment and law led to terrorist charges and a lengthy criminal trial, and then, last year, to jury convictions against Nuttall and Korody.

The jury concluded the pair had, by planting what they thought were explosive devices on the grounds of the B.C. legislature on July 1, 2013, conspired to commit murder and had made or possessed explosive devices with a terrorist purpose.

But the convictions weren’t formally registered because lawyers for Nuttall and Korody immediately asked for a hearing to determine whether the pair had been entrapped. Police, they argued, had led the two accused through every step of the terrorist plot.

Court was told police were alerted to Nuttall and Korody in late 2012 by the Canadian Security and Intelligence Service (CSIS). Nuttall had been heard around Surrey, a Vancouver suburb, muttering about making jihad. To any reasonable person, the ramblings of a basementdwelling, none-too-swift punk rock guitarist and recovering heroin addict in his early 40s, someone prone to absurd conspiracy theories, might have seemed ridiculous.

Nuttall and Korody, his sickly younger partner, did have radical thoughts. They spouted jihadist slogans. He hung around mosques, where he wasn’t made to feel welcome.

But there was no terror plot, no scheme to blow up things and cause death in the name of radical Islam.

The police made one up for them.

In early 2013, the pair was befriended by a Middle Eastern man purporting to have ties to committed jihadists, whom the couple also met. Their new friends — all of them undercover RCMP officers — guided them through the bogus Canada Day bombing scenario, suggesting tactics and supplying them materials for improvised explosive devices, which the couple built and then planted on the legislature grounds in Victoria.

There were no explosions: the bombs were inert, the police saw to that.

It was an elaborate ruse that cost taxpayers hundreds of thousands of dollars. Up to 240 RCMP officers were involved in the sting, court heard. Evidence produced during the pair’s criminal trial — dozens of hours of police surveillance tapes and wiretaps — left no doubt they believed themselves to be part of a terrorist group, that they intended to commit terrorist acts. Based on the evidence and the charges, jurors had little choice but to convict.

But in the ensuing entrapment hearing before Bruce alone, it was made clear the RCMP had “manipulated” Nuttall and Korody. The police had also turned to illegal acts, breaching myriad sections of the Criminal Code, the judge found.

Perhaps just as disturbing, B.C.’s prosecution service had valid concerns about the RCMP’s sting and raised those concerns with officers. Yet Crown counsel allowed the Mounties to keep their investigation going.

Court heard that three weeks before the arrests, a Crown prosecutor giving legal advice to RCMP operatives wrote to one of the senior investigating officers. Martha Devlin revealed she had strong doubts about Nuttall and his capacity for committing terrorist acts.

“This guy really is a nut. Not sure there’s anything here,” Devlin told the Mountie in an email exchange that was later described in court. “My impression is, he has no plan and just sort of makes stuff up.”

The investigation should have ended right there. It did not. Police had gone as far as manipulating and inconveniencing unsuspecting, completely innocent neighbours, by staging an emergency evacuation of a suburban area where Nuttall and Korody were living.

After years of court proceedings, it took one clear-headed judge to see through the stupidity and explain to the public the true facts of this policing and prosecutorial affront.

Here’s the kicker, which Bruce put at the end of her decision: “Simply put, the world has enough terrorists,” she said. “We do not need the police to create more out of marginalized people who have neither the capacity nor sufficient motivation to do it themselves.”