Santa Cruz’s police chief angrily accused the Department of Homeland Security of conducting a secret immigration sweep.

A Northern California raid ostensibly targeting violent gang members triggered a dispute Thursday, with Santa Cruz’s police chief angrily accusing the Homeland Security Department of turning it into a secret immigration sweep.

Chief Kevin Vogel accused Homeland Security officials of lying about the scope of the raids conducted jointly between his department and federal agents this month aimed at apprehending MS-13 gang members.

“The Department of Homeland Security, unbeknownst to us at the Santa Cruz Police Department, had acted outside the scope of this operation and had detained and removed a number of individuals from locations based upon their immigration status,” Vogel said at a news conference. “The community has an absolute right to be angry over this. This has violated the trust of the community, and we cannot tell you how disappointed we are by the betrayal of the Department of Homeland Security.”

Federal officials denied that they acted to deceive local authorities, and said police knew others besides the gang members would be held briefly to ascertain their identities and histories. The department said it detained 10 gang members and 11 others for immigration violations. All but one of those detained for the immigration violations were released, federal officials said.

The controversy comes as tensions over immigration policy under the Trump administration have increased, with many civil rights advocates asserting that federal agents are more emboldened in their actions.

In a statement, U.S. Immigration and Customs Enforcement spokesman James Schwab said that a multiagency operation conducted on Feb. 13 served warrants at 11 locations in Santa Cruz, Daly City and Watsonville as part of an operation to arrest members of the MS-13 criminal organization.

In addition, Schwab said, 11 people in the U.S. illegally were detained for immigration violations because of their association with the suspected gang members. Schwab said the one person still being held had a “criminal history and possible ties to the ongoing criminal investigation.”

“We worked closely with the Santa Cruz Police Department over the last five years on this case,” Schwab said. “Allegations that the agency secretly planned an immigration enforcement action in hopes there would be new political leadership that would allow for an alleged ‘secret’ operation to take place are completely false, reckless and disturbing.”

Schwab said the special agent in charge of the operation notified the police chief that “any non-targeted foreign nationals” at the raid locations would be held briefly to determine their identities and histories, and it was agreed none would be brought to the police facility or placed in police cars.

Ryan L. Spradlin, the Immigration and Customs Enforcement special agent in charge in San Francisco, added in a statement: “It’s unfortunate when politics get intertwined with a well planned and executed public safety operation. When politics undermine law and order, the only winners are the criminals.”

The 10 suspected MS-13 gang members detained were responsible for at least four murders, authorities said.

At his news conference, Vogel said he had been repeatedly assured the raids would target only violent gang members under indictment after a five-year investigation.

Santa Cruz designated itself a sanctuary city more than three decades ago, initially as a refuge for undocumented people fleeing violence in Central America. Under the designation, city officials don’t use immigration status for law enforcement actions.

Vogel said the department first learned of a possible immigration sweep on Feb. 14 from residents at a City Council meeting. He said immigration officials eventually admitted that some detentions were made based on immigration status.

Santa Cruz Mayor Cynthia Chase said the action by federal authorities was disturbing and a violation of the city’s sanctuary status.

“We understand and recognize the anger and fear that are circulating throughout the community,” Chase said.

Jennie Pasquarella, a senior staff attorney and director of the immigrants’ rights project at the American Civil Liberties Union of Southern California, said the complaints levied by Santa Cruz police were emblematic of the increasingly aggressive stance taken by Immigration and Customs Enforcement since President Trump’s most recent executive orders.

“ICE is completely unhinged from any of the prior policies that governed their enforcement actions,” Pasquarella said. “They’re going after everybody that they find including collateral arrests. It signals a dramatic shift in the way that ICE is doing their work.”