President Donald Trump has signed a new law aimed at curbing sex trafficking.

During a White House signing ceremony Wednesday, the president said the survivors "are very brave."

Among those at the ceremony were Trump's daughter, Ivanka, several members of Congress and families of victims.

The law passed Congress overwhelmingly. It weakens a legal shield for online services that host abusive content, including sex trafficking.

The protections made users of such sites as Facebook liable for the content. The legislation grew out of frustration that classified-ad sites can claim they aren't the publisher of questionable content but are merely transmitting posts by others.

"This was a tough one but it's something that we got done. It shouldn't have been tough," the president said.

Trump said trafficking, "is probably worse today than at any time in our history."

"You are not alone," he added. "You are not alone."

Lawmakers in the room included House Majority Leader Kevin McCarthy, R-Calif., Connecticut's Democratic Sen. Richard Blumenthal, and Sen. Rob Portman, R-Ohio. Ivanka Trump, the president's daughter and a senior adviser to the president who has made sex trafficking reform a key issue of her White House tenure, was also present.

The legislation, while it has bipartisan support, has also faced criticism over potential freedom of speech concerns. McCarthy noted it took 10 years to pass such legislation.

"We would not be here today if it wasn't for your courage," McCarthy told survivors and activists in the room.

(The Associated Press, CBS News contributed to this report.)