INDIANAPOLIS — Registered sex offenders who have been banned from social networking websites are fighting back in the nation's courts, successfully challenging many of the restrictions as infringements on free speech and their right to participate in common online discussions.

The legal battles pit public outrage over sex crimes against cherished guarantees of individual freedom and the far-reaching communication changes brought by Facebook, LinkedIn and dozens of other sites.

"It's going to be really, really hard, I think, to write something that will achieve the state's purpose in protecting children online but not be restrictive enough to be unconstitutional," said Carolyn Atwell-Davis, director of legislative affairs at the Virginia-based National Center for Missing & Exploited Children.

Courts have long allowed states to place restrictions on convicted sex offenders who have completed their sentences, controlling where many of them live and work and requiring them to register with police. But the increasing use of social networks for everyday communication raises new, untested issues. The bans generally forbid offenders to join social networks or chat rooms or use instant-messaging programs — just a few of the online tools that civil liberties advocates say have become virtually indispensable to free speech.

After hearing challenges, federal judges in two states threw out laws or parts of laws that they deemed too stringent. In Nebraska, the decision allowed sex offenders to join social networks. And in Louisiana, a new law lets offenders use the Internet for shopping, reading news and exchanging email. A case filed against Indiana's law is under review.

Authorities insist the bans address a real problem: the need to protect children from pedophiles who prowl online hangouts visited by kids.

"It's hard to come up with an example of a sexual predator who doesn't use some form of social networking anymore," said Steve DeBrota, an assistant U.S. attorney in Indianapolis who prosecutes child sex crimes.

Ruthann Robson, a professor of constitutional law at the City University of New York, said the bans could eventually be taken up by the Supreme Court if the justices decide there's a constitutional question.

"If we think that the government can curtail sex offenders' rights without any connection to the actual crime, then it could become a blanket prohibition against anyone who is accused of a crime, no matter what the crime is," Robson said.

Supporters of the bans say they target repeat offenders such as a Maryland man charged with extorting a 16-year-old girl Indiana girl to perform sexual acts during video chats. He was free on bond when he was accused of doing the same thing to more underage girls.

Trevor J. Shea, 21, of Mechanicsburg, Md., was sentenced to 33 years in federal prison in January after pleading guilty to seven counts of production of child pornography.

Xavier Von Erck, founder of Perverted Justice Inc., a group devoted to exposing online sexual predators, said it doesn't make sense for judges to let pedophiles troll the Web for more victims but revoke the voting rights of people convicted of lesser crimes. He called that "judicial hypocrisy."

The American Civil Liberties Union of Indiana, which is challenging Indiana's 2008 law, argues that it's unconstitutional to bar sex offenders who are no longer in prison or on probation from using basic online services.

"To broadly prohibit such a large group of persons from ever using these modern forms of communication is just something the First Amendment cannot tolerate," said Ken Falk, legal director of Indiana's ACLU chapter.

The case is scheduled for a court hearing Thursday. The main plaintiff, referred to in the suit only as "John Doe," was convicted on two counts of child exploitation in 2000 and released from prison in 2003, according to federal court documents.

The man cannot send questions to televised debates or comment on news stories on local websites because doing so requires a Facebook account, the ACLU contends. Neither can he communicate with his out-of-state family members using the social network or post his business profile on LinkedIn.

The plaintiff is also forbidden to supervise his teenage son's Internet use or investigate questionable friend requests sent to his child, the ACLU claims.

Prosecutors argue that social networking sites aren't the only forms of communication.

"The fact is that telephones still work. People including registered sex offenders may still congregate, discuss, debate and even demonstrate," Indiana Deputy Attorney General David Arthur wrote in a brief.

Television and radio are still widespread and offer numerous call-in shows. Newspapers still accept letters to the editor, he added.

The ACLU says precedent is on its side. The lawsuit cites a February ruling in Louisiana in which U.S. District Judge Brian Jackson found that the state's prohibition was too broad and "unreasonably restricts many ordinary activities that have become important to everyday life."

Louisiana lawmakers passed a new law this month that more narrowly defines what sites are prohibited. News and government sites, email services and online shopping are excluded from the new rules, as are photo-sharing and instant-messaging systems. The measure takes effect Aug. 1.

But courts continue to wrestle with the issue in Indiana and Nebraska, where a federal judge in 2009 blocked part of a law that included a social networking ban. A second legal challenge by an Omaha-area sex offender is set for trial in July.

"I think policymakers are struggling to come up with the right policy that makes sense," Atwell-Davis said. "There's no silver bullet."

Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.