New Zealand police acted illegally when armed officers raided Megaupload founder Kim Dotcom's Auckland mansion earlier this year, a High Court judge ruled on Thursday.
Judge Helen Winkelmann said the search warrants police used when they raided the Internet millionaire's property as part of a US probe into allegations of massive online piracy were too broad to be considered reasonable.
The ruling will not end the case against Dotcom -- who is on bail awaiting a bid to extradite him to the United States -- but the judge said that next week she would consider ordering some seized material to be returned to him.
She also found computer data seized by police during the raid had been unlawfully copied and sent to authorities in the United States, who accuse Dotcom of racketeering, money laundering and copyright theft.
"The police relied on invalid warrants when they searched the properties and seized the various items, the search and seizure was therefore illegal," Winkelmann said in a judgement released Thursday.
US authorities allege Megaupload and related file-sharing sites netted more than $175 million and cost copyright owners more than $500 million by offering pirated copies of movies, TV shows and other content.
Dotcom and his three co-accused, who were all arrested in the January 20 raid, deny any wrongdoing and have vowed to fight the charges, which carry potential jail terms of up to 20 years.
Winkelmann will hear final submissions from both legal teams representing the accused and the police next Wednesday before issuing orders.
In a separate legal move, the US District Court in Virginia is scheduled to hear a motion from Megaupload's lawyers Friday to dismiss the case against the company and its executives.
The motion will argue that the US Justice Department and FBI had no right to take action against Megaupload because the Hong Kong-registered company has no presence in the United States.
Police said in a statement that they were considering the judgement and deciding what further action is now required.
Explore further: Govt plan aims to keep older drivers safe on road