During a 4-day operation, immigration officials arrested nearly 500 people for alleged violations, the U.S. Immigration and Customs Enforcement (ICE) announced Thursday.

The operation, called “Safe City,” was primarily conducted in sanctuary cities, which are areas that help to shelter undocumented immigrants and protect them from deportation. The nationwide sweep occurred in locations across the country, including Baltimore, Denver, Los Angeles, New York, Philadelphia, Seattle, areas of Massachusetts, and Washington, D.C. Cook County in Illinois and Santa Clara County, Calif., were also raided. The most arrests occurred in Philadelphia (107), followed by Los Angeles (101).

“Sanctuary jurisdictions that do not honor detainers or allow us access to jails and prisons are shielding criminal aliens from immigration enforcement and creating a magnet for illegal immigration,” ICE Acting Director Tom Homan, said in a statement. “As a result, ICE is forced to dedicate more resources to conduct at-large arrests in these communities.”

Sanctuary cities, counties, and states have policies in place that limit cooperation with federal immigration authorities. Talia Inlender, a senior staff attorney at Public Counsel, which advocates for immigrants, spoke out against the most recent raid.

“It’s clearly a political move that is not actually geared toward public safety,” Inlender told the Los Angeles Times.

During his campaign, President Donald Trump said he plans to block funding for these cities.

"We will end the sanctuary cities that have resulted in so many needless deaths. Cities that refuse to cooperate with federal authorities will not receive taxpayer dollars, and we will work with Congress to pass legislation to protect those jurisdictions that do assist federal authorities,” Trump said in August 2016.

Like previous raids, ICE said they sought out individuals with criminal convictions, pending criminal charges, and gang members or affiliates. ICE claims that those in the Deferred Action for Childhood Arrivals Program (DACA) were not targeted.

“ICE’s goal is to build cooperative, respectful relationships with our law enforcement partners to help prevent dangerous criminal aliens from being released back onto the streets. Non-cooperation policies severely undermine that effort at the expense of public safety,” Homan said.

In a news release, the agency outlined the specifics of some of the arrests made. One arrest in Denver involved an individual who is a citizen of Guatemala and was previously convicted of 6 DUIs and child abuse, among other charges. Another arrest involved a citizen of India caught in Boston, who was previously required to register as a sex offender.

The 498 arrests represent individuals from 42 countries.