New Zealand Prime Minister John Kay has launched an inquiry into "unlawful" spying on Megaupload founder Kim Dotcom by government agents before his arrest in January.

Kim Dotcom
Dotcom was arrested during a raid of his mansion in January. Reuters

The Government Communications Security Bureau (GCSB) is the New Zealand equivalent of the CIA and is forbidden from conducting surveillance on citizens or permanent residents in the country.

A statement by Kay states that the GCSB acted unlawfully while assisting the police to locate "certain individuals" (believed to be Dotcom, Bram van der Kolk and their families) before the arrests were made.

If true, the revelation that GCSB agents were spying on Dotcom and others raises some serious questions about Kay, as the bureau is responsible directly to him and he therefore is presumed to have been aware of any spying which took place.

Opposition leader David Shearer said: "This is a shocking breach of New Zealand's very strict laws restricting the ability of our spy agencies to snoop on people.

"John Kay must also come clean about his claim that he hadn't heard of Kim Dotcom until the Solicitor-General briefed him the day before the raid on the German businessman's mansion. This is simply not credible given the range of people close to John Kay who were involved in the Dotcom case."

The Labour leader added that the Prime Minister would have been required to personally authorise any spying carried out by the GCSB.

"He is responsible as Prime Minister for signing off all intercept warrants by GSCB. While it's been revealed that 'some' bugging was done illegally, it is not credible to think that other monitoring by the agency was not signed by the Prime Minister before the raid was carried out," Shearer said.

"This is not about national security. This is about John Key's own word and whether he has told the truth to New Zealanders."

The case of Dotcom and his Megaupload website - which was shut down in January 2012 for allegedly conspiring to commit copyright infringement, racketeering and money laundering - is one that, in his own words, has turned Dotcom into a "James Bond villain."

"I'm now a real life James Bond villain in a real life political copyright thriller scripted by Hollywood and the White House. I welcome the inquiry by [the Prime Minister] into unlawful acts by the GCSB. Please extend the inquiry to cover the entire Crown Law Mega case," Dotcom said.