New Zealanders will need to be careful about what they post online under a new wide-reaching law, or risk criminal charges over communications deemed deliberately harmful.
The legislation was drafted after the so-called Roast Busters case, in which teenage boys boasted online about sex with drunk and under-age girls.
Justice Minister Amy Adams has said the criminal provisions in the new law are there for only the most serious cases, and the threshold for prosecution is very high.
Children under 14 can't be charged with cyberbullying and those aged 14 to 16 will go into the youth justice system.
"In Australia, which has had a similar offence for more than a decade, only eight prosecutions of 300 have been for under 18-year-olds," Ms Adams said.
Other provisions are aimed at removing offending material from social media sites as quickly as possible.
However, opponents believe vagueness in the legislation means ordinary internet users could be caught up, or free speech curtailed.
The Harmful Digital Communications Bill is likely to pass its third reading today, the final step before it is signed into law. It will create a new offence of sending messages or posting material online that were intended to cause harm, and did so.
Another new offence will be incitement to commit suicide in situations where the person does not then attempt to take their own life. Internet service providers or companies such as Facebook or Google could be asked by a New Zealand agency to remove a harmful communication.
Labour has reluctantly supported the bill, but wants a review once it is in place. Communications spokeswoman Clare Curran said in debate that the definition of harm - serious emotional distress - was very broad.
"That is going to have to be tested in the courts to see what it actually means ... How long is it going to take before there is a 14 or 15-year-old hauled before the courts?"
Act Party leader David Seymour will vote against the bill, the first time he has opposed Government legislation. Mr Seymour said the Independent Police Conduct Authority had examined the Roast Busters case and found that it could have been dealt with under existing law.
Loopholes could be closed by amending existing laws, he said, including extending the intimate covert filming provisions in the Crimes Act to cover "revenge porn".
Other online behaviour like sexual grooming was already illegal. "What are we actually criminalising - kids being mean to each other?"
Mr Seymour said principles in the legislation - including that sensitive personal facts should not be disclosed and communications should not be indecent - were "appropriate if we were about to embark on a school camp", but should not be written into law.
More effective remedies to harmful material would come from online hosts such as Facebook and Twitter, as it was in companies' commercial interests to combat it.
• New cyberbullying law will create a criminal offence of intentionally causing harm by posting a digital communication, punishable by up to two years' imprisonment or a maximum fine of $50,000.
• Complaints can be made to an approved agency, which will attempt to resolve the issue and may contact companies like Google to get material taken down.