The Prime Minister of New Zealand has apologised to Kim Dotcom, the founder of file-sharing site Megaupload, for breaking the law and carrying out a surveillance mission on him in the mistaken belief that the millionaire wasn't a citizen of New Zealand. German-born Dotcom is facing extradition to America to face charges of racketeering and money laundering by running an illegal website which distributed music, films and other copyrighted content.

The New Zealand's Government Communications Security Bureau (the GCSB) stormed Kim Dotcom's mansion in January and seized documents, computers, cars and artwork from his home. The agency's only allowed to spy on foreigners - not citizens or genuine residents, but Dotcom had gained residency in 2010.

Prime Minister John Key said today he's "very disappointed" that the GCSB had failed to understand its legal obligations.

Prime Minister John Key says: "Of course I apologise to Mr Dotcom. I apologise to New Zealanders...I've made it quite clear to thev director of GCSB my level of dissatisfaction. Frankly, I'm pretty appalled by what I've seen."

The agency reckoned it was trying to help the US authorities who want Dotcom extradited there to face the money laundering allegations. Dotcom tweeted Prime Minister Key directly to accept his apology, saying it's time for '… a full, transparent & independent inquiry into the entire Mega case." His extradition hearing is set for next March.