Indiana can't ban sex offenders from joining Twitter, Facebook, or any other social network.

A three-judge panel of the United States Court of Appeals for the Seventh Circuit ruled Wednesday that an Indiana law prohibiting sex offenders from knowingly or intentionally using a website or program that is accessible to people under the age of 18 was unconstitutional.

The law dictated that a first-time offense would be a misdemeanor, whereas a secondary would be considered a felony.

The statute was previously challenged by a convicted sex offender—referred to as John Doe for the sake of his anonymity—in the United States District Court for the Southern District of Indiana. Doe argued that the law was too broad and that it unnecessarily curbed his First Amendment rights.

However, Judge Tanya Walton Pratt, the justice deciding on the case, upheld the Indiana law, claiming that social networking had created a "virtual playground for sexual predators to lurk."

The higher court disagreed.

"The Indiana law targets substantially more activity than the evil it seeks to redress," wrote Judge Joel Flaum in a 20-page decision.

The panel also challenged Indiana's assertion that the law was necessary to deter and prevent sex offenders from committing another crime.

"We conclude by noting that Indiana continues to possess existing tools to combat sexual predators," the decision read.

"But laws that implicate the First Amendment require  narrow tailoring. Subsequent Indiana  statutes may well meet this requirement, but the blanket ban on social media in this case regrettably does not."

The ruling is a big win for the American Civil Liberties Union (ACLU), whose Indiana chapter represented John Doe.

"Enacting laws to govern our society, including protecting our children, is an awesome responsibility that requires our lawmakers balance our need for order with our need for liberty," stated ACLU of Indiana Executive Director Jane Henegar.

"In this instance, the State of Indiana overstepped and unnecessarily burdened one of our most important rights, the freedom to share and receive information and ideas."

The civil liberties organization has been a proponent of advocating freedom of speech online. Previously, the ACLU teamed up with Facebook to file an amicus brief arguing that Facebook likes constituted as free speech. They have also spoken up against employers demanding that workers hand over their social media passwords. Illinois, Michigan, Maryland, and California have already passed legislation that bans employers—and in California's case, universities—from engaging in this practice.

Curiously, Facebook's own Statements of Rights and Responsibilities— its terms of service— prohibit sex offenders from creating an account on the site.

Facebook declined to comment on Wednesday's ruling, though a spokesperson did tell the Daily Dot that the company "take[s] the safety and security [their] users, especially the many young people on Facebook, very seriously."

The spokesperson also cited the aforementioned user policy regarding sex offenders.

Photo via Keith Burtis/Flickr