The High Court of New Zealand, the country’s intermediate appellate court, has ruled that the entire government spying operation conducted against two of Kim Dotcom’s closest colleagues was not authorized under local law in 2011.

According to a court filing newly released on Friday afternoon, Auckland time (late Thursday evening, Eastern Time), the Government Communications Security Bureau conducted an "unlawful" and "unreasonable search" of Bram van der Kolk and Mathias Ortmann, two Megaupload executives. The GCSB is the New Zealand equivalent of the National Security Agency in the United States.

At the time, van der Kolk (like Dotcom himself) was a permanent resident of New Zealand, which meant that he should have been exempted from being spied upon by the GCSB, which apparently failed to adequately verify their immigration status.

Ortmann, a German citizen, had arrived in New Zealand in time to celebrate Dotcom's birthday on January 20, 2012—the same day that the fateful raid on the Dotcom mansion took place. Since shortly after his arrest, Ortmann has been free on bail, but he has not been allowed to leave the country since.

Both van der Kolk and Ortmann challenged the spying in 2016.

These men, like Dotcom, are currently appealing their extradition order to the United States. The Megaupload founder and his colleagues have been battling an American criminal copyright case from New Zealand for years now, and so far they've successfully resisted extradition.

"The entire scope"

Grant Illingworth, an Auckland-based attorney who represents both van der Kolk and Ortmann, told Ars late Thursday evening that the new admission illustrates the lengths that the GCSB went to at the behest of American authorities.

Illingworth explained that because Ortmann, a foreigner visiting New Zealand, successfully challenged the GCSB spying operation with no objection from the government, the entirety of the surveillance of the Megaupload men is now called into question.

"We now believe on the basis of this judgement that the GCSB were acting outside their powers even in relation to a foreign person—because if they were entitled to spy on [Ortmann], GCSB would have denied the allegations," he said. "Which means the illegal spying must have been more than the permanent residence issue—in other words the whole operation was outside the scope of the powers of the GCSB."

In July 2017, another court ruling found that the GCSB had been spying on Dotcom himself for two months longer than had previously been known.

On Friday, a spokeswoman for the GCSB told the New Zealand Herald: "it was not possible for GCSB to plead to the allegations… without revealing information which would jeopardise the national security of New Zealand."

She added that van der Kolk and Ortmann "settled their claims earlier this year."

No endgame in sight

For now, it remains unclear how this new revelation will affect ongoing extradition proceedings and appeals. Dotcom's attorneys are set to appear for a February 2018 appellate extradition hearing at the Court of Appeals in Wellington.

"This judgment does further clarify that it's further a violation of the New Zealand Bill of Rights," Ira Rothken, Dotcom's chief global counsel, told Ars in a phone call late Thursday evening in California.

"There are a lot of issues of first impression in this case, the extradition issues are being tested for the first time. We have a trail of government abuse to now what we're calling an illegal search, and we also have the US, having been found by the New Zealand court to have violated New Zealand law when they took the data offshore without permission. At some point, and we think that point has been met, the case should be dismissed in the interests of justice. How much government abuse do you have to have where the duty of good faith and candor can be violated by the government and the abuse can be so great that no court should entertain an extradition proceeding so tainted with irregularities?"

The new revelations were first reported by Radio New Zealand.