New Zealand Prime Minister John Key apologized to Megaupload founder Kim Dotcom, saying the file-sharing tycoon was spied on illegally, since he was an NZ resident at the time of the surveillance.

Key apologized on Thursday following the release of an official report into the New Zealand Government Communications Security Bureau’s (GCSB) surveillance of Dotcom. The FBI and New Zealand Police conducted an armed raid at Dotcom’s mansion in January of 2012, after requesting the GCSB’s assistance in their covert surveillance.

The GCSB complied with the FBI’s request, apparently in violation of New Zealand law – the GCSB is only allowed to spy on foreign nationals, while Dotcom became a resident of New Zealand in 2010.

"I apologize to Mr. Dotcom… We failed to provide that appropriate protection for him," Prime Minister Key said in a statement.

“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,” he said.

On January 20, 2012, Dotcom, along with Finn Batato, Mathias Ortmann and Bram van der Kolk were arrested during a New Zealand police raid on Dotcom’s estate in Auckland, New Zealand.

Washington has demanded that Dotcom – born Kim Schmitz – be extradited to the US, claiming that he is liable for $175 million in fines for alleged copyright infringement, racketeering and money laundering connected to Megaupload. Dotcom argued that Megaupload only offered online file storage, not file-sharing.

It is not yet known whether this latest development will impede efforts to try Dotcom in the US. The case was dealt its first setback in June, when New Zealand Justice Helen Winkelmann ruled that the warrants for the FBI’s raid on Dotcom’s mansion were illegal. And in August, the court ruled that the FBI must release information seized during the raid to Dotcom’s legal defense team.

"Without access to materials relevant to the extradition hearing phase, the person sought will be significantly constrained in his or her ability to participate in the hearing," Winkelmann wrote in her August decision.

In an interesting turn of events, Kim Dotcom revealed his successor to Megaupload just before the FBI raided his estate in January and shut down Megaupload: A music-sharing service called Megabox.

Megabox was different from Megaupload in that it was a pay-per-download site, which claimed it would offer artists as much as 90 cents for every dollar spent on a music download and would even compensate artists if the download was free. “Yes that’s right, we will pay artists even for free downloads,” Dotcom announced in a press release.

A 90 percent royalty rate is unheard of for most musicians – even with physical copies of music like compact discs, artist royalties rarely add up to more than 20 percent.