New Zealand's High Court ruled Wednesday that Kim Dotcom and a Megaupload colleague can pursue damages against police and one of the country's spy services for illegally intercepting their communications.

In her judgment, Justice Helen Winkelmann also added the Government Communications Security Bureau (GCSB) as a defendant in the case, ordering the agency to turn over some details of the agency's surveillance with respect to national security concerns. Another hearing is planned for next week.

New Zealand's government admitted it illegally spied on Dotcom and Bram van der Kolk prior to a January raid on Dotcom's mansion that coincided with the shutdown of their Megaupload file-sharing service.

Dotcom, van der Kolk and five others were indicted in January by a grand jury in U.S. District Court in Virginia for running Megaupload, which prosecutors alleged rewarded users for trading files without permission of copyright holders, netting the site US$175 million in criminal proceeds.

Dotcom, who holds Finnish and German passports, and van der Kolk are permanent residents of New Zealand, which under the country's law means the GCSB is not allowed to intercept their communications. The GCSB's spying occurred between Dec. 16 and Jan. 20, the day Dotcom's mansion outside Auckland was raided.

According to Wednesday's judgment, Dotcom believes the surveillance may have started as early as November 2011. He is also seeking to find out whether the GCSB shared information with members of the Echelon/Five Eyes, a signal intelligence system run by the U.S., U.K., Canada, Australia and New Zealand.

A representative for New Zealand's attorney general's office has argued that further disclosures "would compromise New Zealand's national security interests, as it would reveal information-sharing protocols and practices with intelligence allies," Winkelmann wrote.

She ruled that most of the information Dotcom and van der Kolk want is relevant, but it does not preclude the GCSB "from claiming public interest confidentiality."

A law enforcement agency, Organised and Financial Crime Agency New Zealand (OFCANZ), sought the assistance of the GCSB prior to the raid on Dotcom's mansion. Further complicating the case, Winkelmann ruled in June that the raid on Dotcom's mansion was illegal because it was based on overly broad search warrants.

In the U.S., Megaupload is trying to get part of its criminal case dismissed, arguing that its headquarters, located in Hong Kong, were not properly served with a criminal summons. U.S. federal criminal procedures dictate that a summons can only be served within the U.S.