Police and the Crown will not appeal a decision to throw out a long-running case against a Nelson motorcycle gang, the Red Devils.
Charges against 21 members of the gang were quashed last month because of a botched undercover investigation, which started in 2009 and began to unravel three years later.
Police were found to have abused the court process, including by staging a fake arrest of an undercover officer.
The charges were dismissed in the High Court in 2012 and the Court of Appeal subsequently reinstated them - but Justice Collins ruled in the High Court in May that all but six of those charges would be stayed.
Earlier today, the Crown confirmed it would not now pursue those charges.
A lawyer acting for the Red Devils, Tony Bamford, said the remnants of the case were reliant on the evidence of an undercover officer, and there were going to be some difficulties tying up loose ends.
Mr Bamford said the remaining three defendants would now apply to be discharged in the Nelson District Court. He said he had never come across a case like it.
"It's quite extraordinary and the severity of it is reflected in the decisions of the court," Mr Bamford said.
"This is a unique and unusual series of events where the police believe they were acting lawfully - erroneously assuming they had approval of a district court judge, and they've gone ahead and effectively committed a number of acts that constituted criminal offending of themselves.
"I suspect the police have learnt a lot out of this. They have been criticised in a number of jurisdictions and there may be consequences beyond this."
Mr Bamford believed the police had amended their protocols and he doubted it would ever happen again.
The police said it was a disappointing end to a complex investigation but it was a reminder that evidence-gathering processes have to be lawful.