CLICK HERE if you’re having trouble viewing the gallery on your mobile device.

OAKLAND — It was meant as an insult. This week, President Donald Trump, adding to the chorus of criticism leveled against Libby Schaaf, called the Oakland mayor a “disgrace” for her stance on federal immigration crackdowns.

But by the time his slight reached liberal California, political pundits agree, his words had the opposite effect: attracting the ire of the Trump administration appears to have tagged her as a political star of the left and a target of the right.

“An insult from Donald Trump is a compliment to a California Democrat,” said Oakland-based political consultant Jim Ross. “If I was her, I’d put it on a big poster and hang it up in my office.”

Start your day with the news you need from the Bay Area and beyond.

Sign up for our new Morning Report weekday newsletter.

As the Democratic party continues to dominate the state, California Republican strategist Matt Rexroad thinks Schaaf would be a viable candidate for any seat here.

“I can’t think of a single district that includes the City of Oakland, or any statewide office, where that would be a disadvantage,” Rexroad said. “The only office she’d be costing herself votes in potentially is President of the United States.”

The 52-year-old mayor has been in the national spotlight before, but sticking her foot into the national immigration debate elevated her to a whole new level. On Feb. 24, Schaaf publicly alerted the Bay Area to upcoming U.S. Immigration and Customs Enforcement raids — what turned out to be a four-day operation netting 232 arrests throughout Northern California.

Three days after her announcement, ICE Acting Director Thomas Homan blamed Schaaf as the reason more than 860 undocumented criminals eluded authorities. White House Press Secretary Sarah Sanders and U.S. Attorney General Jeff Sessions echoed Homan’s comments, saying the U.S. Department of Justice was reviewing whether the mayor broke any laws.

The saga pitted a mid-sized city mayor against the federal government. Hundreds of angry callers phoned her office. One online report said Fox News had mentioned her more than 100 times over a seven-day period, citing a search of a cable-monitoring service.

Schaaf, who once worked as an aide to then-Mayor Jerry Brown, served on the Oakland City Council and was elected mayor in 2014. She is no novice when it comes to dealing with public controversy; she had plenty her first two years in office.

First, Oakland police officers were implicated for allegedly having sex with an exploited teenager, some while the girl was underage. The scandal cast a black eye on the department, cost the police chief his job and prompted Schaaf to announce that she was not interested in running a “frat house.” Months later, in December 2016, 36 people perished in a fire while attending a dance party at the Ghost Ship warehouse, the deadliest structure blaze in modern state history. The fire uncovered numerous flaws in the city’s procedures for conducting fire and building inspections.

But since last week, talk has swirled in Golden State political circles about a bump in her popularity.

Katie Merrill, a California democratic strategist, said Schaaf’s political options have expanded.

“It’s fantastic for her,” said Merrill, who hasn’t worked with Schaaf. “She got a boost to run pretty much for any office she wants to.”

Merrill said that Trump’s broadside introduced Schaaf to Democratic leaders in D.C. who probably hadn’t been paying attention to her career in the past. “Now they know her name in a way they didn’t know her name last week,” she said.

A KPIX-5/Survey USA poll of 500 Bay Area residents taken days after her ICE announcement found 48 percent nodded in agreement while 34 percent opposed it. But 61 percent of those surveyed said local police should assist ICE in raids, something Schaaf and other elected officials in Oakland have opposed.

Schaaf is up for re-election in November, a mayoral race that so far lacks prominent contenders. If she wins, she would be the first two-term mayor since Brown. Schaaf has previously insisted that she is not seeking higher office. But that hasn’t stopped pundits from wondering now if this round of national attention means she’s primed for just that.

The Democrat lives within the districts of Congresswoman Barbara Lee and State Sen. Nancy Skinner. Schaaf has not yet used the attacks as a fundraising tool, unlike Lt. Gov. Gavin Newsom. Newsom, a candidate for governor, reportedly sent out a fundraising email entitled “Jeff Sessions just called me ‘an embarrassment.”

Schaaf’s spokesman, Justin Berton, on Friday said the mayor remains focused on Oakland.

“The mayor’s singular priority is always the long-term well-being of Oakland,” he said, listing issues of affordable housing, homelessness and street repairs. “She appreciates that what has jumped onto the national stage are Oakland’s core values of inclusive diversity and respect for all of our neighbors, no matter where they come from or how they got here.”

Reading this on your phone? Stay up to date with our free mobile app. Get it from the Apple app store or the Google Play store.

Schaaf is in Austin, Texas, this weekend for the South By Southwest Festival. On Monday, she and Boston officials will speak on a panel, “America’s Mayors: Fighting for Racial Equity.” The mayor was booked as a panelist before her ICE warning, Berton said.

With the national political news cycle moving at light speed in the Trump era, it’s hard to say whether the back-and-forth between the president and Schaaf will give her any lasting boost. But if the cross-country jabs continue, “a long, protracted fight between the two would end up benefiting her more than him,” Rodell Mollineau, a Democratic strategist in D.C., predicted.

Still, Hugh Bussell, the chair of the Alameda County Republican Party, predicted her warning would be a major campaign issue if she ran for statewide office in the future.

“I’m sure her calculation was that she wanted to get support from liberals,” Bussell said. “But many people in California and across the country are shocked that she would do that.”