An Immigration and Customs Enforcement spokesman said he resigned after the Trump administration made false statements about a California mayor who warned immigrants about an impending arrest operation.

Top Trump administration officials have said the mayor's warning prevented ICE from arresting hundreds of "criminal aliens."

But the former ICE spokesman said that's not true, adding that he was told to "deflect" media questions about the numbers.

A spokesman for the federal Immigration and Customs Enforcement agency has resigned, accusing the Trump administration of making false statements about a major operation that netted 232 unauthorized immigrants.

The spokesman, James Schwab, said it was untrue that more than 800 "criminal aliens" escaped arrest due to a warning days earlier from Oakland's mayor, as the Trump administration claimed.

"I quit because I didn't want to perpetuate misleading facts," Schwab told The San Francisco Chronicle on Monday. "I asked them to change the information. I told them that the information was wrong, they asked me to deflect, and I didn't agree with that. Then I took some time and I quit."

ICE conducted a major, four-day arrest operation in northern California, beginning on February 25.

The previous day, Oakland Mayor Libby Schaaf released a public statement warning the community that ICE was planning the sweep.

Schaaf said it was her "duty and moral obligation as mayor to give those families fair warning when that threat appears imminent," adding that she believed many of the immigrants ICE was targeting were law-abiding.

Enraged at her defiance, multiple top Trump administration officials publicly vilified Schaaf, accusing her of jeopardizing ICE officers' safety and preventing hundreds of arrests.

'Those are 800 wanted aliens that are now at large'

Donald Trump. Getty Images Trump himself called Schaaf a "disgrace" during speech in Pennsylvania on Saturday night.

"They had close to 1,000 people ready to be gotten, ready to be taken off the streets," he said. "They say 85% of them are criminals and had criminal records. And the mayor of Oakland went out and warned them, scattered, so instead of taking in 1,000, they took in a fraction of that."

ICE Director Thomas Homan said in a statement that "there's 800 that we are unable to locate because of that warning, so that community is a lot less safe than it would have been."

Attorney General Jeff Sessions, too, said in a Sacramento speech last week that "ICE failed to make 800 arrests that they would have made if the mayor had not acted as she did. Those are 800 wanted aliens that are now at large in that community."

But Schwab, who represented ICE's San Francisco office, told media that he wanted the agency to correct their numbers. He added that ICE knew it was extremely unlikely they would arrest the full target list of roughly 1,000 unauthorized immigrants — not all of whom were criminals.

"I didn't feel like fabricating the truth to defend ourselves against [Schaaf's] actions was the way to go about it," Schwab said. "We were never going to pick up that many people. To say that 100% are dangerous criminals on the street, or that those people weren't picked up because of the misguided actions of the mayor, is just wrong."

Other ICE officials told Fox affiliate KTVU that Schwab resigned "abruptly" and that the agency disagrees with him on the characterization of the issue.

"While we can't put a number on how many targets avoided arrest due to the mayor's warning, it clearly had an impact," ICE spokeswoman Liz Johnson said.

Trump is making his first stop in California as president on Tuesday. He'll be inspecting the eight wall prototypes along the Mexican border.