WASHINGTON (Reuters) - U.S. President Donald Trump on Wednesday signed legislation aimed at penalizing website operators that facilitate online sex trafficking and chipping away at a legal protection for the technology industry.

The law is intended to make it easier for state prosecutors and sex-trafficking victims to sue social media networks, advertisers and others that kept exploitative material on their platforms, although victims would be required to show websites knowingly facilitated sex trafficking.

The signing occurred as Washington sharpens its scrutiny on technology companies, which have largely evaded regulation, for their use of privacy protections and consumer data. Mark Zuckerberg, the chief executive of Facebook Inc, has been testifying before lawmakers this week.

Silicon Valley has long opposed efforts to rewrite the Communications Decency Act, which protects companies from liability for content posted by their users and has been credited with fueling the sector’s growth for 20 years.

However, Facebook and other technology companies and lobbying groups mostly withdrew opposition to the legislation in recent months after negotiating changes that limited the bill’s potential impact.

Some technology companies fear the bill could signal more efforts to tighten regulation on the industry.

Law enforcement has lobbied for such legislation for years, and the bill had drawn support from Ivanka Trump, the president’s daughter and a White House adviser.

“This is a momentous day in the fight to help stop online sex trafficking, and a big victory for trafficking victims and survivors who for too long have been denied the opportunity to get the justice they deserve,” said Republican U.S. Senator Rob Portman, a co-sponsor of the Senate version of the bill.

On Monday, an indictment against Backpage.com, the internet’s second-largest classified ads website, which is used for sex trafficking, was unsealed.

Trump, who had been expected to sign the bill, did not respond to reporters’ questions when he signed it.