First, federal authorities seized the classified advertising website Backpage.com last week. Then, a 93-count indictment was unsealed, charging several of its top officials with facilitating prostitution and revealing details about victims including minors as young as 14.

Now, President Trump has signed new anti-sex-trafficking legislation into law on Wednesday. The law, which passed Congress with near unanimous bipartisan support, will give prosecutors stronger tools to go after similar sites in the future and suspend liability protections for internet companies for the content on their sites.

“You have endured what no person on earth should have to endure,” Mr. Trump said to victims of sex trafficking and their families who attended the signing ceremony in the Oval Office.

Before it was shut down, Backpage featured ads like one titled “Get freaky Tuesday,” according to the indictment. There were graphic descriptions of women of different ages and racial backgrounds. The grand jury charged that many of the ads also depicted children who were victims of sex trafficking.