New Zealand has passed a controversial new law that bans trolling, or “harmful digital communications,” with offenders facing up to two years in jail.

Under the Harmful Digital Communications Act in effect this week, anyone convicted of “causing harm by posting digital communication” faces two years in prison and a $50,000 (NZ) ($33,650 U.S.) fine.

Harmful communications can include truthful or false statements, and “intimate visual recordings” such as nude photos or video shared without permission, The Telegraph reported.

The bill passed the New Zealand parliament by a 116-5 vote. And under a parallel amendment to New Zealand’s Crimes Act, a person who tells another to kill themselves faces up to three years in prison, The Telegraph reported.

Proponents argue the law will deter cyberbullies and protect victims. Critics, however, say the law harms free speech.

Greens MP Gareth Hughes argued that while the law’s intent is “noble,” its definition of “harm” is “irresponsibly broad” and could damage journalism in New Zealand.