New Zealand Prime Minister John Key has apologized to Kim Dotcom after a report from the Inspector-General of Intelligence and Security found that the government illegally monitored the Megaupload founder. The Government Communications Security Bureau (GCSB) carried out surveillance on Dotcom, but did not check out his residency status, instead relying on incorrect information supplied by the police.

“Of course I apologize to Mr Dotcom, and I apologize to New Zealanders.”

These were the humbling words of New Zealand Prime Minister John Key today after a report from Inspector-General of Intelligence and Security Paul Neazor found that a NZ security service did indeed wrongfully spy on Kim Dotcom and associate Bram van der Kolk.

In a media conference following the release of the report, Key said that New Zealanders had a right to be protected by the law and that the government had “failed to provide that protection to them.”

The findings of the report, commissioned by the Prime Minister on September 17, were released this morning and are a clear embarrassment to the government.

Neazor found that the Government Communications Security Bureau (GSCB), which by law can only conduct action against foreign targets, failed to check Dotcom’s immigration status. If they had done so they would have discovered he hold’s a permanent resident’s visa.

“The GCSB relied on information provided to it by the Organized and Financial Crime Agency. In my view, reliance on another party by GCSB is unacceptable,” Key said.

“It is the GCSB’s responsibility to act within the law, and it is hugely disappointing that in this case its actions fell outside the law. I am personally very disappointed that the agency failed to fully understand the workings of its own legislation.”

So just how did Dotcom come to be monitored illegally? The purported answers to that question can be found in a section of the report titled “Potential for confusion.”

“As this matter went along what was discovered in the case of Dotcom and associated people was that resident status had been obtained on their behalf under the Immigration Act 1987 and carried forward under the later 2009 Act. It was understood incorrectly by the GCSB that a further step in the immigration process would have to be taken before Dotcom and associates had protection against interception of communications,” Neazor wrote.

“The illegality arose because of changes in the Immigration Act wording and some confusion about which category Dotcom was in thereafter.”

But whatever the case, according to a document published by ComputerWorld, police clearly knew of Dotcom’s residency status when they compiled a planning document known as the “Blue Folder” in which help from the anti-terrorist Special Tactics Group was requested.

Following Mr Key’s apology today [video here], Dotcom announced his acceptance via Twitter, but called for an investigation into the case against him.

“I accept your apology,” Dotcom wrote. “Show your sincerity by supporting a full, transparent & independent inquiry into the entire Mega case.”