Image copyright Getty Images Image caption Mayor Libby Schaaf says she is part of the "resistance" against Mr Trump's policies

Federal officials say a California mayor's "irresponsible" tip-off about an immigration raid allowed more than 800 "criminal aliens" to evade capture.

Oakland leader Libby Schaaf has defended her warning to the public about the immigration agents' swoop.

US Immigration and Customs Enforcement (Ice) agents said they were nevertheless able to detain 150 people.

Half of those detained in Tuesday's raid had criminal convictions, according to Ice.

"I do not regret sharing this," said Mayor Schaaf, a Democrat, who issued her warning on Saturday.

"It is Oakland's legal right to be a sanctuary city and we have not broken any laws," she added.

"We believe our community is safer when families stay together."

In a statement announcing the arrests, Ice deputy director Thomas Homan singled out Mayor Schaaf for criticism.

Media playback is unsupported on your device Media caption The missing - consequences of Trump's immigration crackdown

He also deplored so-called US sanctuary cities, which limit the assistance they offer to federal immigration officials.

"The Oakland mayor's decision to publicise her suspicions about Ice operations further increased that risk for my officers and alerted criminal aliens - making clear that this reckless decision was based on her political agenda with the very federal laws that Ice is sworn to uphold," he said.

He said 864 immigrants with criminal records "remain at large in the community and I have to believe that some of them were able to elude us thanks to the mayor's irresponsible decision".

On Saturday, Mayor Schaaf warned of imminent Ice raids in the San Francisco Bay area, though she said she was unaware of "precise locations" to be targeted.

"I am sharing this information publicly not to panic our residents but to protect them," said her news release.

"My priority is for the well-being and safety of all residents, particularly our most vulnerable."

This isn't her first row with Mr Homan.

Last month she told reporters she would be willing to go to jail to defend her city's policy.

Media playback is unsupported on your device Media caption What's life like for the American students who move to Mexico with their parents?

Her defiance followed a suggestion by Mr Homan that the Justice Department should criminally charge politicians who support sanctuary jurisdictions.

Mayor Schaaf said she had consulted with her legal team before issuing the weekend's warning.

They had determined she did not violate any laws because she had obtained the information from unofficial sources rather than through formal government channels, she said.

But former federal prosecutor Tony Brass told CBS in San Francisco that "she's on the threshold of obstruction of justice for doing what she did".

Last week President Donald Trump threatened to withdraw immigration enforcement agencies from California, accusing the state of shielding "horrible criminals".

Mr Trump predicted state officials would be "begging" for federal immigration authorities to come back within two months because crime rates would skyrocket.