A federal appeals court has struck down an Indiana law that imposes broad social media restrictions on most registered sex offenders, finding it unconstitutional.

The U.S. Court of Appeals for the Seventh Circuit held that the law — which bars most registered sex offenders from using social networking websites, instant messaging services and chat programs — broadly bans protected speech rather than curtailing speech targeted to minors.

A "John Doe" filed a class action in January 2012 on behalf of similarly situated registered sex offenders in the state, claiming that the law violated their First Amendment rights.

In June 2012, Judge Tanya Walton Pratt of the Southern District of Indiana found the law to be narrowly crafted to serve a significant state interest and that class members have ample alternatives, including social networking sites without minors, email and message boards.

The Seventh Circuit reversed Pratt’s decision and remanded the case for her to enter judgment for Doe and issue a permanent injunction against enforcement of the law. Judge Joel Flaum wrote the opinion in Doe v. Marion County Prosecutor.

"Though content neutral, we conclude that the Indiana law is not narrowly tailored to serve the state’s interest, " Flaum wrote. "It broadly prohibits substantial protected speech rather than specifically targeting the evil of improper communications to minors."

Flaum noted that "the Supreme Court has invalidated bans on expressive activity that are not the substantive evil if the state had alternative means of combating the evil."•