It turns out that at least some of the paranoia displayed by Megaupload founder Kim Dotcom was justified, with an official report from the New Zealand authorities revealing that, yes, he actually was being illegally spied upon – an embarrassing admission that has led to the controversial figure receiving an apology from none other than John Key, the country’s Prime Minister.

Dotcom, a former German national whose real name is Kim Schmitz, had previously claimed that he was under surveillance from authorities, a claim that brought derision from many quarters who believed that no matter how much of a nuisance to trademark and copyright bodies, he was nonetheless unimportant enough to warrant such treatment. That turned out not to be the case, as the report published today by New Zealand’s Inspector-General of Intelligence, revealed. Instead, Dotcom really was being snooped on by the Government Communications and Security Bureau… despite it actually being illegal to do so.

(The law specifically prohibits NZ authorities from spying on nationals and residents; Dotcom legally became a permanent resident of New Zealand back in 2010.)

In response to the report, Prime Minister Key issued a statement that blamed “basic errors” for Dotcom’s surveillance, but nonetheless took responsibility for what had happened. “It is the GCSB’s responsibility to act within the law,” he said, adding that “It is hugely disappointing that in this case its actions fell outside the law.”

According to the report, the error came from the New Zealand police. The GCSB reportedly relied on information provided by the police when they asked the organization to “keep track” of Dotcom and associates ahead of a planned raid at the start of this year on a location where it was believed the servers, computers and other physical resources related to the operation of Megaupload were being stored, and it was this information – specifically, relating to Dotcom’s legal status within the country – that was believed to be faulty.

This is the second embarrassing revelation about the New Zealand authorities’ investigations into Dotcom’s digital doings. Earlier this year, a court in the country ruled that the search warrants used in that January raid were actually illegal, meaning that the raid and everything that was found during it to be used in evidence against Dotcom was entirely invalid. This decision, in turn, affected the US case for extraditing Dotcom to face charges relating to copyright infringement. Currently, American authorities are appealing that ruling, with the hope that it will be allowed into evidence in time for the extradition hearing, which has been delayed until March 2013 in order to allow for a final decision from the New Zealand court. Judging by recent experience, however, the US might want to think of a Plan B…