A court in New Zealand has ruled that the search warrant used in the arrest of Megaupload founder Kim Dotcom was legal, toppling a large part of his defence.

The warrant used to arrest Dotcom at his mansion two years ago, as well as to seize his laptops and hard drives was previously ruled illegal back in June 2012, after a judge decided that the warrants were too vague. But the New Zealand government, acting for the US authorities, has successfully appealed the decision.

"In deciding that the search warrants were valid, the Court of Appeal accepts that they were in form defective in some respects, but the defects were not sufficient to mean that the warrants should be treated as nullities," the court said in a statement.

"Mr Dotcom and the other respondents would have understood the nature and scope of the warrants, especially in light of their arrest warrants, which were not defective, and the explanations given to them by the Police when the properties were searched. In these circumstances no miscarriage of justice occurred."

However, the appeals court did stand behind the earlier decision that sending clones of the seized electronic evidence to the US was outside of prosecutors' authority.

The US wants to see Dotcom extradited to face charges of copyright infringement and piracy. The Department of Justice has said in a filing that Dotcom was the head of "a worldwide criminal enterprise, which operates and administers several internet websites that reproduce and distribute infringing copies of copyrighted works, including motion pictures, television programs, musical recordings, electronic books, images, video games, and other computer software".

Prosecutors have accused the Megaupload site of costing movie studios and music labels more than $500m while making off with over $175m in ill-gotten gains by letting users share and store films and albums.

Dotcom's attorney Ira Rothken tweeted that the legal team was "reviewing the rulings made by the Court of Appeal and will likely seek leave to appeal to the Supreme Court". ®