A new bill designed to crack down on cyberbullying has been passed by Parliament.
The Harmful Digital Communications Bill creates a new criminal offence of intentionally causing harm by posting a digital communication. Serious offences can be punished by up to two years in jail or fines of up to $50,000.
The wide-reaching law means it will now be an offence to send a message or post material online that is intended to cause harm, and does so. It will also be an offence to incite suicide.
It introduces a range of measures, including setting up an agency to investigate and address damaging electronic communications spread through emails, texts and social media posts.
The law was drafted after the Roast Busters case in Auckland in which teenage boys boasted online about sex with drunk and underage girls, leading to the girls being further victimised.
It passed its third and final reading by 116 votes to five, with ACT's David Seymour and four Green MPs voting against it.
National MP Chris Bishop said traditional schoolyard bullying had moved online, with one in five adolescents saying they had experienced harmful communications on the internet.
Gareth Hughes, who was one of the four Green MPs to make the rare step of casting a vote separate from his party, said he was concerned it could have a chilling effect on freedom of speech. "Ultimately this bill is overboard and risks limiting our freedom of expression and the important role of the media in our democracy."
Labour MP Jacinda Ardern said Labour felt backed into a corner. "Yes there are elements that we think were worthy of discussion but there are elements that were deeply worrying for us."
Communications Minister Amy Adams has agreed to review the law if any problems arise.