The U.S. Court of Appeals for the 7th Circuit on Wednesday blocked an Indiana law that prohibited registered sex offenders from using social networking websites like Facebook.

Overturning a lower court's decision, the Seventh Circuit ruled (PDF) the law prohibited too much speech to be constitutional under the First Amendment. The law sought to prevent the sexual exploitation of minors, but targeted "substantially more activity than the evil it seeks to redress," the court said. Laws that implicate free speech must be "narrowly tailored."

"Indiana has other methods to combat unwanted and inappropriate communication between minors and sex offenders," the Seventh Circuit added, noting the state already had laws that punished inappropriate online activities.

The ACLU of Indiana challenged the law on behalf of an unnamed sex offender, alleging it violated his First Amendment rights.

“There is no doubt that the State has a paramount interest in protecting children,” Ken Falk of the ACLU, the attorney in the case, said.

“But the Court properly recognized that the State cannot do this with a law so broad that it prevents someone convicted of an offense years, or even decades ago, from engaging in a host of innocent communications via social media. Indiana already has a law that prohibits inappropriate communication with children, and the law in this case served no purpose but to prohibit communication protected by the First Amendment.”

A similar law in California was blocked earlier this month.