NEW YORK — Just days after Pope Francis labeled sex trafficking as “criminal” and apologized for any Catholics who participated in it, the United States Congress has passed legislation that would allow prosecutors to go after websites that advertise for prostitutes — a move hailed by leading Catholic activists as an embrace of Francis’s plea to end the scourge of human trafficking.

The bill, known as FOSTA (Allow States and Victims to Fight Online Sex Trafficking Act), had previously passed the House in February, and was approved by the Senate on Wednesday.

President Donald Trump is now expected to sign it into law although an exact date has yet to be announced. Once it takes effect, the legislation will amend the Communications Decency Act, which passed in 1996, and has allowed websites to evade criminal and civil actions from victims of online sex trafficking, which often included teenagers being advertised as sex workers.

Under particular scrutiny is the website Backpage.com — a popular online classified advertisement site that has been accused of knowingly being involved in sex trafficking, yet up until now has successfully been shielded from prosecution.

RELATED: Pope says prostitution tortures women, apologizes for Catholic ‘clients’

Mary Leary, professor of law at The Catholic University of America, praised the legislation as “one more blow to the exploitation of human beings and treating them as commodities.”

Leary said that the legislation should receive widespread support, but added that Catholics, who “hold that all people, even the most marginalized, should have access to justice,” should be especially pleased.

While anti-trafficking laws exists in all 50 states, the current version of section 230 in the Communications Decency Act did not allow websites to be held accountable for content posted by third party users. The new legislation will now hold websites responsible for knowingly promoting illegal activity, such as the likes of Backpage.com.

Section 230 “was used as a shield by bad actors who are fully aware of their role in facilitating and profiting from the horrific crime of child sex trafficking,” said Andrea Picciotti-Bayer, a legal advisor to the Catholic Association.

“The true test of how much teeth this new law has will be in its aggressive enforcement by law enforcement and in the courts against the unscrupulous,” she told Crux.

Leary, whose areas of expertise include human trafficking and technology, said that according to some studies, 70-83 percent of sex trafficking comes from online advertisements.

“That’s a large group of victims of crime who are unable to access laws that are currently on the books,” she said.

According to Leary, the bill is narrowly tailored legislation “only dealing with the worst of actors.” Yet even so, she said that the very fact that access to justice is being achieved by now having the ability to go after “the most egregious offenders who up until now have had immunity” is progress.

“In my mind that’s a tremendous advancement,” said Leary.

Catholic advocates have cheered Congress’s actions, noting that it comes at a time when the global Church has spotlighted the issue of human trafficking and become a leading player in the fight to bring it to an end.

“Trafficking is a global problem that thrives as much in the dark corners of refugee camps, as it does in the dark corners of the internet,” said Bill O’Keefe, vice president for government relations and advocacy at Catholic Relief Services.

“The United States’s efforts to combat human trafficking has saved the lives of countless people around the world. The Church, with Pope Francis’s leadership, will continue to fight this ‘crime against humanity’ and shed light on those who are suffering and need support,” he told Crux.

Those sentiments were echoed by Picciotti-Bayer who urged all American Catholics to continue to heed the pope’s concerns against trafficking.

“Pope Francis has asked countries to consider how their complicity tolerates and even encourages sex trafficking. Catholics in America must heed the Holy Father’s concern,” she said.

“We can contribute to the protection of children from trafficking through continued emphasis on safeguarding of the innocent and the proper understanding of human sexuality as a gift between spouses —not something to be bought and sold on the net,” said Picciotti-Bayer.