The New Zealand’s government websites have been taken down by hackers protesting against a new law.

The attacks come in the midst of the government proposing a controversial bill that would allow the General Communications Security Bureau (GCSB) to become involved in domestic operations, offer technical support to police and the Security Intelligence Service on anti-terrorism and organised crime operations.

GCSB is currently engaged in spying on foreign targets via electronic listening posts while snooping on residents or citizens of New Zealand is outside its purview.

The so-called Anonymous New Zealand had allegedly attacked 14 websites of the centre-right National Party, including websites for the Prime Minister and Finance Minister.

The hacking group called the bill ‘a despicable piece of legislation’, Reuters reported.

Kim Dotcom said: "Dear Anonymous NZ, hacking National Party websites is just giving John Key a new excuse to pass the #GCSB bill…Please stop it."