WASHINGTON — It’s an issue that has libertarians and prostitutes on one side and almost all of Congress on the other. The Stop Enabling Sex Traffickers Act passed the Senate by a nearly unanimous vote Wednesday, but critics on and off the Hill warn that the bill could enable government censorship.

The bill, which passed in the Senate by a 97-2 vote, was originally introduced in the House by Rep. Ann Wagner, R-Mo. The bill, known as SESTA or FOSTA, aims to help local law enforcement address websites that enable sex trafficking like Backpage.com. Under current law, websites cannot usually be held liable for content created by users, which means that people who operate sites where trafficking is common cannot be prosecuted.

“Online trafficking is flourishing because there are no serious, legal consequences for the websites that profit from the exploitation of our most vulnerable,” Wagner said in a statement when the House voted on the bill. “This FOSTA-SESTA package will finally give prosecutors the tools they need to protect their communities and give victims a pathway to justice.”

SESTA would enable an online company to be prosecuted or fined if it “promotes or facilitates” prostitution or “acts in reckless disregard of the fact that such conduct contributed to sex trafficking.” Under SESTA, sex trafficking victims could also sue the websites that enabled that trafficking.

But critics warn that the bill would restrict free speech by encouraging websites to censor user content.

Although the House of Representatives overwhelmingly passed the bill, 388 to 25, notable “no” votes in that chamber included several members of the libertarian-leaning House Freedom Caucus, among them Rep. Justin Amash, R-Mich., and Rep. Paul Gosar, R-Ariz.

The Electronic Frontier Foundation, a digital rights advocacy group, argues that SESTA will drive websites to use algorithms to identify and eliminate problematic speech. “When platforms rely too heavily on automatic filtering, it almost always results in some voices being silenced,” the organization said in a statement. “The most marginalized voices in society can be the first to disappear.”

That was also the rationale of Sen. Ron Wyden, D-Ore., one of two senators to oppose the bill. (The other, Sen. Rand Paul, R-Ky., did not explain his reasoning in a public statement or return a request for comment.)

“Having written several laws to combat the scourge of sex trafficking, I take a backseat to no one on the urgency of fighting this horrendous crime. However, I continue to be deeply troubled that this bill’s approach will make it harder to catch dangerous criminals, that it will favor big tech companies at the expense of startups and that it will stifle innovation,” Wyden said in a statement.

Wyden’s “no” vote came after the Oregon senator introduced an amendment to moderate the bill — by shielding websites from liability if they moderated their forums – that was ultimately unsuccessful.

The other group that has vehemently opposed SESTA is not usually known for its political advocacy. Many American sex workers, some of whom perform work that is illegal under state prostitution laws, have publicly voiced their concern that SESTA will prevent them from exchanging safety information related to their work.

“The problem is these bills target websites that are widely and inaccurately believed to be hubs of trafficking activity when it is precisely those websites that enable people in the sex trades to do their work safely and independently,” wrote Alana Masset, identified as a former sex worker, in an editorial for Allure Magazine.

Other current and former sex workers shared their opposition on Twitter using the hashtag #SurvivorsAgainstFosta.

This opposition was not enough to prevent SESTA and FOSTA from successfully passing in both chambers of Congress; the bill will now head to the White House, where President Donald Trump is expected to sign it into law.