Oakland Mayor Libby Schaaf’s warning about federal immigration sweeps might look like a no-brainer on the local political front. After all, one poll of 500 Bay Area residents, by KPIX-5/Survey USA, found 48 percent approved of her heads up and just 34 percent turned thumbs down.

However, the same poll found that 61 percent said police should help federal authorities in cases involving undocumented immigrants suspected of committing violent crimes. Immigration and Customs Enforcement says about half the 232 people picked up in its sweeps last week had criminal records, though the agency didn’t say how many of those were violent criminals.

ICE also says hundreds of “criminal aliens and public safety threats” remain at large, and that some may have eluded capture because of Schaaf’s warning. There’s every reason for the feds to make the mayor look bad if one of those who got away goes on to murder someone.

Joe Tuman, a San Francisco State University communications studies professor who ran against Schaaf for mayor in 2014 and lost, says she could have accomplished her goal in a way that didn’t put “Oakland on ICE’s hit list.” He said quietly spreading the word to immigrant legal support groups would have been just as effective as her Saturday night news release.

City Councilman Noel Gallo, whose Fruitvale District is heavily Latino, agreed. He said annoying the feds isn’t in the city’s best interest.

“The gang MS-13 is operating in my area, and there are a lot of times that we need the FBI and the federal help,” he said.

Councilwoman Rebecca Kaplan, rumored to be considering a challenge to Schaaf from the left in this year’s election, tried to have it both ways. First she criticized the mayor for not taking the quiet approach. Then she said Schaaf’s critics on Fox News were “wrong ... to go after her.”

She’ll have a hard time outflanking Schaaf on the progressive front on this one. After all, in Oakland politics, standing up to President Trump and ICE is an easy win.

San Francisco Chronicle columnists Phillip Matier and Andrew Ross appear Sundays, Mondays and Wednesdays. Matier can be seen on the KPIX TV morning and evening news. He can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call (415) 777-8815, or email matierandross@ sfchronicle.com. Twitter: @matierandross