On Tuesday, the New York Court of Appeals, the highest court in the state of New York, ruled 5-2 that the 2010 Albany County cyberbullying law is in violation of the First Amendment.

The Albany law made it a crime to electronically communicate “private, personal, false, or sexual information,” intended to “harass, annoy, threaten, abuse, taunt, intimidate, torment, humiliate, or otherwise inflict significant emotional harm on another person” for no legitimate purpose.

The court ruled that while the teen’s actions were “repulsive and harmful,” the county law is overly broad.

“It appears that the provision would criminalize a broad spectrum of speech outside the popular understanding of cyberbullying, including, for example: an email disclosing private information about a corporation or a telephone conversation meant to annoy an adult,” wrote Judge Victoria Graffeo in the decision.

The county plans to rewrite the law to address the court’s concerns, according to Albany County Executive Daniel P. McCoy. “The law is needed to protect children from cyberbullying … I believe that we are on the right track and that we can work together to craft a law that both protects free speech and keep kids,” he said in a statement released to reporters.

The court’s ruling could stand as a guidepost for other high state courts hearing challenges to such laws in other states. Besides Albany, four other New York counties and more than a dozen states, including Louisiana and North Carolina, have similar laws.