Police were investigating the Red Devils Motorcycle Club in Nelson when they became concerned that one of their undercover officers, known to the gang as as Michael Wiremu Wilson, was about to be exposed.

To strengthen his credibility, police planted apparently stolen equipment and drug paraphernalia in his lock-up. With a fake search warrant and a forged signature, they arrested Wilson, who then appeared before several judges who had no idea of the ruse.

As a result, in a decision released today, Justice France threw out charges against 21 people accused of drugs offences and being part of an organised criminal group.

Police bosses believed they had permission from then Chief District Court Judge Russell Johnson to go through with the ruse. But Justice France said the letter they gave Judge Johnson was “wholly inadequate”.

Justice France said: “A fraud is being committed on the courts. The judges who are dealing with it are being treated in a disrespectful way.”

But the Police Association called the judge’s remarks a “slap in the face”, saying the officer had risked his life for more than a year.

The operation was overseen by Detective Inspector Grant Wormald, who headed the joint raid on internet millionaire Kim Dotcom’s mansion earlier this year.

Image via Getty