TRENTON — A new state law intended to root out online advertisements for underage sex has been blocked by a federal judge, fueling a growing national debate over whether internet companies should be forced to police what users post.

The law — signed by Gov. Chris Christie in May and slated to go into effect at the beginning of this month — is part of a crackdown on human trafficking. It makes it a first-degree crime to knowingly publish, disseminate or display an advertisement and any photographs promoting sex with a minor.

Backers of the measure said during legislative hearings it was needed to hold websites, particularly those that offer classified advertisements, responsible for perpetuating child sex abuse and underage prostitution.

But there’s a hitch: The entire effort might be illegal.

Two web companies sued last month claiming the state law, while well-intentioned, violates a long-standing federal law that grants websites sweeping immunity from being held liable for the material people post online.

U.S. District Judge Dennis Cavanaugh temporarily blocked New Jersey’s law June 28, and the state faces a steep legal climb when oral arguments begin in Newark on Aug. 9.

An identical law in Washington state was struck down last year and eventually repealed, costing taxpayers $200,000 in legal bills. Another attempt in Tennessee was struck down in January. Even some New Jersey legislators who voted for the bill acknowledged during hearings it might not be legal.

"I totally think it’s a waste of time," said Matthew Zimmerman, senior staff attorney for the Electronic Frontier Foundation, which is representing one of the companies. "It should never have been passed in the first place."

Supporters of the law, including Christie, defended it as being worthy of a fight.

"We didn't go into it concerned about how the law might be challenged," said

Colin Reed, a spokesman for the governor, whose office reviews the legality of bills, "but rather how children could be protected from dangerous predators."

The conflict dates to the dawn of the internet. Fearing a proliferation of pornography, Congress in 1996 passed the Communications Decency Act to criminalize making obscene or indecent material available to people younger than 18.

But not wanting to limit the growth of the web, lawmakers made a major concession to online companies: They would not be held responsible for any controversial or illegal content posted by independent people who visit their sites.

"We couldn’t have Twitter if Twitter was responsible for user content because they would probably want to pre-screen it," said Eric Goldman, a law professor at Santa Clara University in California. "If they pre-screen it, we don’t have Twitter."

He said the provision, known as Section 230, is "what’s enabled people to talk to each other freely online."

But state authorities across the country say that with this provision, the Communications Decency Act is harming the very children it intended to protect by allowing companies — some of which make big profits — to claim ignorance and avoid any responsibility.

A group of state attorneys general plans to ask Congress to amend the act, and Republican U.S. Sen. Jeffrey Chiesa — who as New Jersey attorney general made targeting human trafficking a priority — said he supports that effort.

"I’ve seen these ads," Chiesa said in an interview. "Ads of obviously physically abused underage children being promoted for sex. If your business model is designed to promote sex trafficking, that’s not something we should countenance."

He said the arguments that stricter policing would limit free speech online are "hollow."

But Goldman and other communications law experts said amending Section 230 for one particular cause could be dangerous.

They acknowledged the need to combat human trafficking, but pointed out that the advertisements provide authorities with a starting point for investigations and that there was little evidence that removing them would help cure the problem.

In the decision striking down the law in Tennessee, the federal judge wrote the state had "shown no evidence that criminalizing the sale of certain advertisements would have any effect on child sex trafficking."

"Do you go after the criminals or do you try to target the people who provide services because they’re really visible and easy to target and potentially have money, and at the same time cut down on large swaths of free speech?" Zimmerman said.

In the New Jersey case, Zimmerman represents the Internet Archive, a nonprofit organization based in San Francisco known for its popular Way Back Machine, a free service that allows visitors to search and view historical images of websites.

Zimmerman said the group maintains more than 300 billion web pages, which would be impossible to screen.

"They’re able to exist and able to take on that kind of monumental task because they are not legally responsible for any kind of illegal activity that takes place on the websites they archive," he said.

The other company challenging the law, Backpage.com, an online classifieds website, said New Jersey’s actions were "antithetical to free speech" and "would require online service providers to become the government’s censors of the internet."

The same concerns were raised by two New Jersey lawmakers during an Assembly Judiciary Committee hearing last year.

"I just think you’re running a very close constitutional question on trying to punish people who provide the medium which other people then abuse," Assemblyman Michael Patrick Carroll (R-Morris) said at the time.

He said last week he eventually voted for the bill out of fear of being portrayed as "pro-human- trafficking."

"There are a lot of problems with this bill," Carroll said. "I should have stuck by my principle and voted against it."

The bill’s sponsor, Assemblywoman Valerie Vainieri Huttle, said she was confident of a court victory.

"The Office of Legislative Services said it was constitutional," Huttle (D-Bergen) said. "We knew we may have challenges but in our opinion, the burden was miniscule in relation to eliminating child trafficking on the internet."

RELATED COVERAGE

• N.J. Assembly sends human sex-trafficking bill to Christie

• Senate budget committee approves bill to combat human trafficking

• N.J. bill would increase penalties for human sex trafficking

FOLLOW STAR-LEDGER POLITICS: TWITTER | FACEBOOK