An U.S. Appeals Court decided today that everyone in the United States should be allowed to use social media despite what they may have done in their past, even if that past includes sexual offenses. The 7th U.S. Circuit of Appeals in Chicago made the declaration in response to a case launched by the American Civil Liberties Union of Indiana to an Indiana state law that restricted access to sites like Facebook and Twitter in order to protect children from receiving sexually explicit messages.

The Indiana branch of the ACLU filed a class action suit against the law on behalf of an unidentified man who had served three years for child exploitation, as well as other known sex offenders who were affected by the ban despite no longer being on probation. However, last June, U.S. District Judge Tanya Walton sided with the Indiana authorities, saying in her ruling that the state was simply working to protect children online and noting that social networks were essentially a “virtual playground for sexual predators to lurk [in].” The rest of the Internet, she pointed out, was unaffected by the state’s ban, and available to sex offenders.

That outlook didn’t sit well with the 7th Circuit judges, who unanimously voted to overturn the earlier decision and issued a 20-page ruling on the subject. That ruling noted in part that the Indiana law “broadly prohibits substantial protected speech rather than specifically targeting the evil of improper communications to minors,” adding that “the goal of deterrence does not license the state to restrict far more speech than necessary to target the prospective harm.” It continues, “Regulations that do not implicate the First Amendment are reviewed only for a rational basis. The Constitution even permits civil commitment under certain conditions. 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.”

This ruling shouldn’t come as a complete surprise; attempts to create similar barriers to social media in Nebraska and Louisiana have also been struck down by Federal judges in the last year (leading to Louisiana passing a law that required all known sex offenders to identify themselves as such on social media sites, instead).

Responding to the ruling, ACLU legal director Ken Falk said that the Indiana authorities’ decision to add this law five years ago was unnecessary in the first place. “Indiana already has a law on the books that prohibits inappropriate sexual contacts with children,” he said. “This law sought to criminalize completely innocent conduct that has nothing to do with children.” Indiana’s Attorney General, Greg Zoeller, has said that his office will review the new ruling before deciding on what to do next.