Immigration officials on Thursday said they’ve targeted sanctuary cities in recent days, arresting hundreds of undocumented immigrants in communities the Trump administration says offer limited cooperation with federal authorities.

In all, the U.S. Immigration and Customs Enforcement said it arrested 498 people during a four-day national operation that ended Wednesday. Those arrests included 167 people taken into custody in Southern California.

The agency said its operation specifically targeted cities and counties that have defied President Donald Trump’s efforts to increase deportations of people living in the country illegally and his calls for local governments to work closely with ICE to facilitate that aim. The action seems to be ICE’s first billed as solely focusing on places it considers to be uncooperative.

RELATED (May 25, 2017): ICE arrests nearly 190 immigrants in Southern California operation, most with criminal convictions

“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 prepared statement. “As a result, ICE is forced to dedicate more resources to conduct at-large arrests in these communities.”

In Southern California, ICE arrested 101 people in Los Angeles County and an additional 66 arrests in the counties of Orange, Riverside, San Bernardino, Ventura, Santa Barbara, and San Luis Obispo as part of the operation.

The City of Los Angeles has refused to hold inmates wanted by immigration officials beyond their scheduled release dates without a warrant. The Los Angeles City Council members earlier this month introduced a resolution to make the city a sanctuary.

In Orange County, Santa Ana officially declared itself a sanctuary in January. But the Orange County Sheriff’s Department has a close relationship with ICE, including a contract that allows deputies to act as immigration agents to interrogate inmates about their legal status.

ICE said it targeted immigrants with criminal convictions, and 317 of the people arrested had prior convictions, according to the agency. While some of those convictions were for violent acts, drug crimes or weapons possession, more than a quarter were for driving under the influence. The agency did not say why roughly one-third of those arrested – or 181 people – were taken into custody even though they do not have criminal records.

RELATED: ICE calls ‘surge’ of SoCal immigrant arrests ‘routine’ but some fear it’s the ‘new normal’

The agency said it did not target participants of the Deferred Action for Childhood Arrivals program.

Salvador Sarmiento, a campaign coordinator for the Los Angeles-based National Day Laborers Organizing Network, views the arrests and ICE’s publicity about them as a political statement to penalize uncooperative jurisdictions.

“ICE is operating as a politicized security force… arresting 498 people in cities that represent the political opposition to what is an unconstitutional federal overreach on immigration,” Sarmiento said.

“No one believes that Trump or ICE are guided by public safety.”

Robin Hvidston, executive director of We the People Rising, an anti-illegal immigration group based in Claremont, said ICE was simply enforcing federal immigration laws as written.

“They are targeting criminal aliens, and they focused on high populations of individuals that are here illegally – also known as sanctuary cities,” Hvidston said. “It shouldn’t be a surprise to these cities that an operation like this has gone forward.”

In its report, ICE highlighted the arrest of Colonia Chiques, who it described as a Los Angeles gang member from Mexico who was in the country illegally.

“At the time of his arrest, the subject rammed multiple law enforcement vehicles in an effort to evade arrest,” ICE wrote. “After he was placed under arrest, a search of his person revealed a loaded handgun in his pocket. The subject was turned over to local authorities and charged with assault with a deadly weapon, probation in possession of firearm, carrying a concealed weapon and carrying a loaded firearm in public.”

The agency said 18 of the people arrested were gang members.

Staff writer Alejandra Molina contributed to this report.