Police have been left embarrassed by two judges in separate cases throwing out charges against up to 28 Red Devil bikie gang members.

A judge yesterday halted drugs and firearms charges against 21 people because the police staged a fake arrest of an undercover cop. Justice Simon France ruled that the police's actions were "a fundamental and serious abuse of the court's processes".

The decision puts the Organised and Financial Crime Agency of New Zealand in the firing line again after the controversial raid on the home of internet tycoon Kim Dotcom.

Detective Inspector Grant Wormald headed both operations, and has been accused by Dotcom's lawyers of giving misleading evidence.

In a second case involving the Red Devils another judge was so concerned about a raid on club premises that he threw out charges against 28 people. Many are among the accused whose charges were dismissed yesterday.

The swoop on a barbecue at the Red Devils Motorcycle Club in Nelson was part of a two-year bid to snare gang members. About 50 people were at the August 2010 function and police suspected liquor laws were being broken.

However, in July this year Judge Chris Tuohy ruled out evidence because it was "improperly obtained" through "a series of breaches of the defendants' rights, some of which were significant infringements".

Officers had obtained search warrants to search the property but not individuals. After finding a small amount of drugs, they searched the party guests. Judge Tuohy said entry was "unlawful and unreasonable" as police chainsawed through fences despite being let through the front gate.

Judge Tuohy also said there was "no lawful basis" for the seizure of cash from guests. Some of those at the party were left with no money to get home, he said.

They were not adequately informed of their rights and were detained for a "unjustified length of time" in a cold yard in the early hours of a winter morning.

All 28 faced a charge of being on an unlicensed premises.

In the damning judgment issued yesterday, Justice France ordered a stay of proceedings in the prosecutions of 21 people arrested as part of Operation Explorer.

Undercover cop Michael Wiremu Wilson had infiltrated the Red Devils. Police faked a search warrant for a lockup he was renting in May 2010 and "found" stolen property and cannabis paraphernalia. Wilson was arrested and prosecuted - his true identity unknown to the judge, lawyers and court staff.

Earlier this year two officers told the High Court at Nelson they followed protocol by approaching then chief district court judge Russell Johnson, now dead.

Justice France later found the protocol was written after the fake prosecution, and guidelines at the time actually stated: "The police must not allow an arrested agent to appear under a fictitious name without the permission of the court. Deceiving the court is not permitted."

Christchurch barrister Steven Rollo, who acted for seven of the accused, said there were questions about whether the crime agency was directing its powers at appropriate targets.

"If you look at Ofcanz's operations in terms of the people that they've arrested, then some might say they've been a success: they've locked up some high media profile targets and an internet tycoon [Dotcom]," Mr Rollo said.

"But if you look at the nature of the underlying offending, you've got to ask is this something that a specialised organised crime agency should be looking at?"

Solicitor-general Michael Heron has 10 days to appeal against Justice France's ruling.

FAKE PROSECUTION 'NAIVETY IN THE EXTREME'

Senior police who committed a "fraud" on the court system by faking the prosecution of an undercover officer were bordering on committing criminal acts themselves, legal experts say.



Head of the Canterbury University Law School, Chris Gallavin, said the police actions were "bloody ridiculous".



"It's absolutely abhorrent police would go to such lengths. I can't understand where the police were coming from – it shows naivety in the extreme. I think the court's been quite generous to say there's been no bad faith."



Throwing the charges out was entirely proper. with such a massive abuse of process. "I'd go so far as to say the officers were on the precipice of committing criminal acts."



Auckland University law professor Warren Brookbanks said police had acted "very, very inappropriately. The clear message is it went beyond their brief."



Dr Gallavin said the case would probably not be appealed because it was a "very poor look" for the prosecution.



Police Association president Greg O'Connor was dismayed by the judgment. "When are these courts going to realise this is not tiddlywinks?"



Mr O'Connor said the police had acted in good faith and "once again the rules have changed. The losers are the people of Nelson, who will now have a new gang in town, strutting round stronger than ever – they fought the law and they won."

OPERATION EXPLORER

Police set out to target the Red Devils in 2009 by obtaining warrants to intercept telephone calls and text messages and to install listening devices. They also infiltrated the gang with two undercover officers posing as a couple.

In March 2011, they staged a series of raids in Nelson, arresting 37 people, including 11 people they said were members of the motorcycle gang.

At the time police said the gang and associates faced charges including drugs and firearms offences, theft and participating in an organised crime group. Police also said they seized 28g of methamphetamine with a street value between $12,000 and $18,000, 13 motorbikes, 16 firearms, two pipe bombs and other items including nine cars.