The only man convicted in a botched police operation on the Red Devils gang has now been let off.
Trevor John Momo Wilson was in 2012 sentenced to two-and-a-half years' prison after being caught up in a large police operation on the Red Devils gang in Nelson.
Mr Wilson was the only one of the 21 accused to plead guilty following an elaborate 18-month undercover meth operation by police.
Police laid 151 charges against the men on a series of drug-related charges and threatening to kill, among other.
Mr Wilson himself was convicted of possessing LDS and selling cannabis.
After he pleaded guilty, the prosecution against his co-offenders was stayed on the grounds there had been an abuse of power and serious misconduct by police and a lack of evidence.
It was found the police officers had used fake warrants to create a "bogus prosecution" of an undercover officer to convince the gang he wasn't a policeman.
In a ruling today, the Supreme Court quashed Mr Wilson's conviction and ordered there would be no retrial.
"It was an abuse for him to have been proceeded against at all," Justice Terence Arnold said in its decision.
He said having a retrial would "undermine the values of the criminal justice system" and amount to an "abuse of power".
Mr Wilson in 2014 appealed to the Court of Appeal, but only had his sentence reduced to nine months home detention.
He served four and a half months before being released on bail.
In June this year, police abandoned their case against the gang following a series of legal appeals.