New Zealand’s Supreme Court ruled on Tuesday (PDF) that warrants granted by the Court of Aukland in 2012 to search Kim Dotcom were legal. Warrants to search Dotcom compatriots Finn Batato, Mathias Ortmann, and Bram van der Kolk were also upheld. Dotcom et. al were ordered to pay NZ$35,000 (about US$27,000) to New Zealand's Attorney General for legal costs.

Further Reading New Zealand appeals court reverses ruling that Megaupload warrants were illegal

In 2012, the United States federal government accused Dotcom of racketeering, copyright infringement, and money laundering in connection with his website Megaupload, which the US contends encouraged people to share pirated copies of music and movies.

The thrust of Dotcom’s argument against the search warrants was that they were overly broad and "authorized search and seizure of material likely to include that which was irrelevant and private.” In 2012, Ars reported that "New Zealand police cut their way through locks and into Dotcom's 'panic room,' seized 18 luxury vehicles, secured NZ$11 million in cash from his bank accounts, and grabbed 150TB of data from 135 of Dotcom's digital devices.” The United States had requested the search warrants under the Mutual Assistance in Criminal Matters Act.

Over the last three years, the case challenging the search warrants has moved through New Zealand’s High Court to the Court of Appeal and now finally to the Supreme Court. Early after the raid on Dotcom’s New Zealand mansion, High Court Judge Helen Winkelmann ruled the raid illegal and said the warrants facilitated a “miscarriage of justice.”

Those early wins for Dotcom were fleeting, however, with the Court of Appeal overturning Winkelman’s decision in February 2014.

The Supreme Court agreed four to one with the Court of Appeal that, although the warrants were flawed in form, those flaws did not make the warrants invalid. While the warrants "could have been drafted rather more precisely,” the Supreme Court’s ruling reads, the criminal activity that the US accused Kim Dotcom of "is extensive and is alleged to have been carried out through what, outwardly, resembled a legitimate large-scale cloud storage facility.” The ruling continues:

Through the New Zealand Police, the United States authorities sought and obtained warrants to search for and seize material, including computers, relevant to that alleged offending. The computers were plainly relevant to the offending alleged, although some of their contents were undoubtedly irrelevant. As a practical matter, the computers would have to be taken offsite to enable cloning and search for relevant material. Accordingly, we agree with the Court of Appeal that the appellants were reasonably able to understand what the warrants related to and that the police were adequately informed of what they should be looking for. Any issues relating to matters such as the way the search of the computers was conducted or the handling of irrelevant material should be addressed through other processes.

Kim Dotcom’s legal battles extend across many fronts, and, taken as a whole, the proceedings constitute one of the most expensive cases in New Zealand history.

Most recently, in October of this year, New Zealand’s Court of Appeals ruled that Dotcom had to reveal his financial assets to the Hollywood studios that are suing him for piracy. A month later, Dotcom told a London tech conference that he was “officially broke” after transferring his remaining assets to his wife and kids. At the same time, prosecutors asked New Zealand courts to throw Dotcom back in jail in advance of his 2015 extradition hearing, calling him a "flight risk.” That bid was thwarted in early December, and Dotcom will remain free on bail.