A California court on Friday made final decision to throw out pimping charges against the operators of adult classifieds site Backpage.com, an embarrassing end for incoming US Senator Kamala Harris and one of her final high-profile prosecutions as California attorney general.

Harris announced charges against the Backpage CEO during her US Senate campaign, and in a late-October statement, the company described her allegations as "an election year stunt, not a good-faith action by law enforcement."

Backpage CEO Carl Ferrer was arrested in early October and charged with crimes that included pimping a child, while two others involved with the site were arrested and also charged with pimping. Harris released a statement at the time accusing Ferrer and Backpage of "raking in millions of dollars from the trafficking and exploitation of vulnerable victims."

But Backpage and its executives are protected by federal law that shields website operators from legal responsibility for content posted by their users, a California judge said in a tentative ruling that was made final Friday. The judge's remarks echoed the company's own defenses to previous allegations that it illegally facilitates and profits from prostitution and sex trafficking.

"Congress stuck a balance in favor of free speech in that Congress did not wish to hold liable online publishers for the action of publishing third party speech, and thus provided for both a foreclosure from prosecution and an affirmative defense at trial," the judge, Michael Bowman wrote. "Congress has spoken on this matter and it is for Congress, not this Court, to revisit."

Harris is the latest in a long line of politicians and law enforcement officials who have tried to use legal means to shutter Backpage, whose primary business is advertising for adult services. But Backpage has been able to defeat most civil and criminal claims by pointing to the strong language of the Communications Decency Act, a 1996 federal law that contains strong protections for web publishers.

Section 230 of the Act guarantees that "no provider or user of an interactive computer service shall be treated as the publisher or speaker of any information provided by another information content provider." Judges have affirmed that Section 230 means online platforms cannot be held responsible for what is published by their users.

The rule has frustrated law enforcement officials, who insist Backpage plays a major role in facilitating sex trafficking and underage prostitution. The Section 230 provisions are so strong — they override federal and state law, for instance — and are so frequently applied in cases involving Backpage that many observers were surprised when Harris brought her case in the first place.

"So much of the law is so well established," said David Greene, the civil liberties director at the Electronic Frontier Foundation said, that "many cases are not even brought now." The EFF often advises courts to broadly interpret Section 230 in defense of web publishers.

Last year, a federal judge in Massachusetts dismissed a lawsuit against Backpage by plaintiffs who said they had been “molested and repeatedly raped” by men who found them through advertisements on the site. Two of them were under 18 when they had been allegedly pimped.

“The allegedly sordid practices of Backpage… amount to neither affirmative participation in an illegal venture nor active web content creation,” the judge said in his decision. “The existence of an escorts section in a classified ad service, whatever its social merits, is not illegal.”

Harris may have felt more confident in pressing charges due to judges casting a skeptical eye on Section 230 in recent cases. In May, a San Francisco judge rejected a claim by Airbnb that the rule should override a city ordinance preventing the company from running ads by hosts who have not registered their properties with local authorities.

And in June, a judge ruled that "revenge porn" site operator Kevin Boallert, who ran a pair of websites — one for users to post explicit photos of others, and another that charged the people in the photos for taking them down — was unable to appeal his prison sentence on Section 230 grounds. The court said Boallert's sites were "designed to solicit" unlawful content and therefore did not qualify for protection.

"I’m seeing judges becoming quite skeptical, in various cases, of Section 230," said Eric Goldman, a Santa Clara University law professor. Goldman said the pursuit of the Backpage operators was given a boost by the successful conviction of Boallert.

But in Backpage's case, the attempt by Harris to define Backpage as a pimp due to its role in hosting advertisements by other pimps raised eyebrows in legal circles, leading to its demise.

"The definition of pimping as interpreted by this attorney general might apply to wide range of vendors and other service providers," Goldman told BuzzFeed News, saying that it could also implicate a laundromat or hair dresser for providing services to sex workers. "The services provided were the dissemination of speech, which raises an extra layer of concern. We might be nervous about the laundromat for the clothes, but prosecuting them doesn’t raise the same kind of speech issues."

CORRECTION

Nov. 29, 2016, at 16:59 PM

The operators of Backpage.com were charged with pimping. An earlier version of this story said they were charged with sex trafficking.