The Supreme Court of Nova Scotia has struck down an anti-cyberbullying law passed in response to the death of Rehtaeh Parsons, calling the legislation a "colossal failure" and saying it infringes on charter rights.

The Cyber-Safety Act was the first law passed in Canada aimed at protecting victims of online harassment. The Nova Scotia government introduced it two years ago under intense public pressure after Parsons, a 17-year-old girl, was bullied, attempted suicide and subsequently died.

Parsons's family alleged she was sexually assaulted in November 2011, when she was 15, and bullied for months after a digital photo of the incident was passed around her school. She was taken off life-support after attempting suicide in 2013.

Supreme Court Justice Glen McDougall released his decision on Friday, ruling the anti-cyberbullying law must be eliminated right away — unlike other court decisions that have struck down legislation but offered politicians a one-year grace period to rewrite the laws.

"The act must be struck down in its entirety. The attorney general has not persuaded me that a temporary suspension is warranted," McDougall wrote.

"To temporarily suspend the declaration of validity would be to condone further infringements of charter-protected rights and freedoms."

Called too far-reaching

McDougall said his job was to figure out whether the Cyber-Safety Act unnecessarily includes material that has little or nothing to do with preventing cyberbullying.

"In this regard, the Cyber-Safety Act, and the definition of cyberbullying in particular, is a colossal failure," he wrote.

Nova Scotia was the first jurisdiction in Canada to try to regulate cyberbullying. Several other provincial governments were waiting for the law to be tested against a constitutional challenge.

The legislation authorized courts in the province to grant protection orders that limit what alleged cyberbullies can post online.

Critics called the law too broad and far-reaching.

David Fraser says the anti-cyberbullying law was rushed through without consideration of how it affected freedom of expression. (CBC)

This year, privacy lawyer David Fraser challenged it, saying the law violates Canadian freedom of expression as guaranteed by the Charter of Rights and Freedoms.

Fraser said Friday that amid the tense climate after Parsons's death, when people were questioning why no one was prosecuted, the government "jammed" together legislation. It did so without consulting with appropriate experts or examining how the law would fit with freedom of expression, he said.

'It's absolutely Draconian'

"My own personal opinion is the government at the time wasn't willing to throw the police and the Public Prosecution Service under the bus, and what can politicians do?" he told CBC News.

"They can say we didn't have a law, therefore we have to come up with a law."

Fraser said the law was always too broad and had the power to limit people from expressing themselves online.

"People should be able to express their honestly held opinions, particularly on matters of public interest," he said.

"Anything that hurts anybody's feelings, if it's done online, it's cyberbullying. You can be liable, you can sue somebody for cyberbullying, you can be subject to an order that can cut you off from the internet, confiscate your electronic devices. It's absolutely Draconian."

Fraser represented Robert Snell, who was charged under the act after posting comments on social media about a former business partner, Giles Crouch. Crouch was granted a protection order under the law that prevents Snell from communicating with him.

Victims won't be without recourse, says judge

The Crown had argued that given the nature of cyberbullying and how quickly messages can spread online, it's necessary to protect a complainant against potential retaliation from a bully by allowing the victim to seek an order against the tormentor before a justice of the peace without giving notice.

The legislation was created to fill a gap in existing laws, the Crown argued, and provide an alternative to a civil suit for defamation.

McDougall said victims won't be without recourse.

"The fact that the act was enacted to fill a 'gap' in the legislation does not mean that victims of cyberbullying will be completely without redress in the time it takes to enact new cyberbullying legislation," he wrote.

"They will have the usual — albeit imperfect — civil and criminal avenues available to them."

Nova Scotia Justice Minister Diana Whalen said Friday her department is considering whether to appeal the decision, rewrite the law or draft new legislation from scratch.

Fraser said he hopes the government goes back to the drawing board and drafts a law that properly protects people from online harassment.