A New Zealand court has handed over all the evidence against Kim Dotcom to the Megaupload founder because it reckons the warrants used in the 2012 raid were illegal.

A high court in the country has decided the police have to give Dotcom a copy of everything they picked up that's relevant to the US investigation, including all the evidence they sent to the Feds.

"I have concluded the appropriate remedy is to require the police to conduct the sorting exercise they should long since have undertaken," Judge Helen Winkelmann said in a statement.

"As suggested in the warrants’ judgment they will likely need the assistance of FBI agents to undertake that exercise. If so, they should avail themselves of that assistance, but that exercise will need to be undertaken onshore, where the material remains subject to the jurisdiction of the New Zealand courts.

"Any storage device that is found to contain no relevant material should be returned to the plaintiffs. Storage devices with both relevant and irrelevant data, that is to say, mixed content devices, should be cloned and a clone copy provided to the plaintiffs. This cloning and the provision of clones to the plaintiffs should occur before any material is shipped to the FBI in the United States," she added.

The New Zealand police arrested Dotcom and three of his colleagues at the request of the US authorities on 20 January 2012. Dotcom was set free on bail in February of that year. In March of that year, US authorities filed an extradition request asking that the three face charges related to alleged online piracy in the United States.

Dotcom, who is resident in New Zealand, is resisting the extradition and has said that the site was just a storage service for folks and what they happened to store there was their business. An extradition hearing is currently set for August, but Dotcom doesn't seem too concerned. He's since launched another file-storage site and pretty much flipped the bird at the Feds by calling it Mega. ®