Editor’s Note: This is one of several stories about the Bay Area’s response to Donald Trump’s presidency, which San Francisco is publishing over the next month as part of the February 2017 Resistance Issue. To read stories as they become available online, click here.

Deep within City Attorney Dennis Herrera’s mazelike wing inside City Hall, the resistance stirs. Here, surrounded by teetering stacks of legal tomes, Herrera oversees more than 30 teams of lawyers, which have spent the past few months predicting various scenarios presented by the most unpredictable president-elect in history. Common sense (and attorney-client privilege) prevents Herrera from showing all of his cards. But the city’s chief litigator does have an unlikely weapon should he be forced to do battle with a hostile Donald J. Trump administration: GOP-style states’ rights.

“The Republican Party has always talked about the new federalism, and how they want to see the federal government out of the way so localities can deal with issues of concern,” Herrera says, smiling tightly. “Conservatives have, for generations, talked about states’ rights. Well, OK. We can manage our own issues. Get out of our issues. This is the ultimate local control.”

It’s hard for a city to fight a country. Herrera knows this. San Francisco mayor Ed Lee knows this. U.S. senator Dianne Feinstein, Minority Leader Nancy Pelosi, Lieutenant Governor Gavin Newsom, and all of the 38 other political, legal, and community leaders pictured in San Francisco's photo portfolio of the local resistance know this. In order to win such a fight, a city might have to redefine the meaning of the word win. But from Herrera’s point of view, the key to the Bay Area’s survival under President Trump is to wage our own states’-rights crusade. Just how this may unfold during a Trump presidency remains opaque—as does any notion of what’s to come over the next four years. But given both political realities and economic necessities, it’s a certainty that San Francisco, Oakland, San Jose, and many other large American cities will be working their respective legislative levers and, if necessary, going to the legal mattresses to, as Herrera puts it, “protect our people and our resources.”

This adversarial approach isn’t an entirely new one for a city like San Francisco. Ever since President Ronald Reagan drastically cut funding crucial to cities in the 1980s—from housing subsidies to job training programs to legal services for the poor to community development grants to public transit investments—all cities, but especially proactive ones like San Francisco, have had to redefine and widen the scope of local control in the face of federal antipathy and neglect. Cities like San Francisco have filled the void to do things large (carving out municipal healthcare, raising the minimum wage, guaranteeing paid parental leave, litigating on behalf of marriage equality) and small (banning Happy Meals, taxing grocery bags). And the cold shoulder Trump will likely give San Francisco is, in turn, the logical terminus of nearly four decades of Republican small-government philosophy. As scary as the worst proposals of the Trump platform may seem to most Bay Areans, what they represent is, by and large, the status quo under GOP regimes across the country (albeit quite possibly supersized this time around).

Of course, there are limits to what municipalities can do; in the end, federal laws can’t simply be ignored. But cities and the (oft-blue) states in which they reside are not entirely helpless in the face of federal aggression. In recent years, cities have taken large and consequential actions regarding workers’ rights, environmental issues, or even financial regulation and tax reform.

So, right now, San Francisco supervisor Malia Cohen is resurrecting an old progressive notion of creating a municipal bank. This would, in theory, be a bulwark against a possible repeal of the Dodd-Frank Act and an assault on the Consumer Financial Protection Bureau. (Also, not insignificantly, a San Francisco Municipal Bank would do business with newly legal cannabis impresarios.) Cohen’s colleague, Supervisor Jane Kim, is intrigued by a Portland plan to tax CEO compensation, an opportunity for cities to backfill their general funds in light of forthcoming tax breaks for the wealthy. Former New York City mayor Michael Bloomberg has urged individual cities to sign on to the Paris climate change agreement if Trump reneges on our national commitment, and Governor Jerry Brown has signaled that he won’t be cowed by threats to the state’s climate- and science-friendly efforts. (Brown, in classic cantankerous form: “If Trump turns off the satellites, California will launch its own damn satellite.”)

Furthermore, municipalities can take their own initiative regarding wages and working conditions. We can even institute our own decriminalization efforts: More than 40 American cities and hundreds of counties now have a sanctuary policy for undocumented immigrants. Many of these locales have, like San Francisco, pushed the boundaries of local control for years.

But all of this autonomy comes with a potential cost: Billions of federal dollars could well evaporate as a consequence of our preferred policies. California could lose some $20 billion in Affordable Care Act reimbursements alone; San Francisco itself may be stripped of between $478 million and around $1 billion in federal funds, 10 to 20 percent of the city’s General Fund.

More specifically, families could be broken apart; elderly and sick people could be dropped from healthcare coverage; and it no longer seems paranoid to fear that border patrol agents could set surveillance drones upon people or enter their homes without warrants or probable cause in any town near the nation’s border.

So that’s the price of following through on our principles. Those romanticizing the notion of “the resistance” would do well to contemplate the abject misery that has spawned resistance movements, and the grim conditions experienced by those who take part in them. (Google “Jean Moulin.”) California’s powers-that-be are starkly predicting that the administration will indeed pinch every pinchable penny from this state. “I am sure Mr. Trump will try to force us into bending to his will,” says billionaire environmentalist and Democratic financier Tom Steyer. “He’s going to try to use money to force us to give up on our deepest ideals.”

Leaders in the Bay Area and particularly San Francisco never miss an opportunity to proselytize about our “values.” But when uttered by conservative critics, phrases like “San Francisco values” are a dog whistle for reactionaries, tantamount to a slur. For President Trump, it was nothing short of manna from heaven when, in July of 2015, an undocumented Mexican felon came into possession of a stolen gun and shot 32-year-old Kate Steinle in broad daylight along the picturesque San Francisco waterfront. The tragedy presented a gift-wrapped encapsulation of Trump’s brutally Manichaean worldview, and it gave credence to his argument that this country is under assault from within. Juan Francisco Lopez-Sanchez allegedly pulled the trigger, but it was the values of this sanctuary city that were to blame for Steinle’s death. San Francisco valued the right of a Mexican criminal to be in America more than it valued “Beautiful” Kate’s right to live.

There are any number of rational arguments to counter this set of aspersions. For starters, immigrants commit proportionally fewer crimes than native-born Americans. Far from being a ticking time bomb, Lopez-Sanchez did not have any violent offenses in his lengthy criminal dossier. And he was inexplicably toting a pistol that a federal agent had left to be swiped from his car. But stating all of the above assumes this is an argument to be won or lost on a rational level, a realm where our new president does not always seem to dwell.

Will Trump really be out for blood in San Francisco simply to settle a score against the self-styled capital of the resistance? “That thought has occurred,” says Senator Feinstein from her office on the 24th floor of a downtown San Francisco skyscraper. “I do wonder whether he will be a vindictive president. We have to find out. Vindictiveness really has no place in executive office. It is bad public policy.”

But that, again, assumes that our new president cares about public policy, or harbors any coherent policy benchmarks to begin with. Rather, Trump’s policy to this point has been to punish and humiliate those who oppose him. This puts San Francisco in the crosshairs: No place was more bombastic in opposing Trump than the Bay Area. Only 9 percent of San Francisco voters selected the GOP ticket, and less than 5 percent of Oakland voters did so. This, of course, was part of a larger pattern: Trump was thrashed in every corner of urban America. In Texas, only 42 percent of Houston-area voters picked him. He won just 22 percent of the vote in Los Angeles, 18 percent in his hometown of New York City, 12 percent in Chicago, and 4 percent in his new pied-à-terre, Washington, D.C. But harming San Francisco would hold a particular appeal to Trump: Attack this region and you attack the very personification of urban liberalism.

This is why Bay Area immigration attorneys say their phones have been ringing at five times the normal rate since November 8. Trump’s pledge to deport perhaps three million people, and proposals made by a top adviser to define down “criminal alien” to anyone who’s merely been arrested (and not even convicted), could wreak havoc here—in San Francisco, one of every three public school students has an immigrant parent. In the wake of Trump’s victory, Mayor Lee summoned every last member of the City Family to join him under the City Hall dome, where he helmed a “unity rally.” Everyone showed up. “It was a wonderful event,” says attorney Francisco Ugarte, immigration specialist in the Public Defender’s Office. “It made me proud to live in this city.”

But the greatest challenge for the city’s lawmakers may not be summoning the courage to face down the conservative majority in Washington (we’ve been doing that ever since our last Republican mayor, George Christopher, left office in ’64). Rather, the real feat will be the ability to remain unified as an opposition force. Almost immediately after Lee’s City Hall rally, the cohesiveness was undermined by preexisting internecine politics. Former supervisor David Campos’s postelection push to allocate $5 million to the Public Defender’s Office, enabling it to hire lawyers to represent immigrants in deportation trials, was spiked by the mayor. Lee whittled down the offering to $1.2 million and also decreed that the money would be directed not to the public defender but rather to various nonprofits. (In December, Los Angeles, whose population is four times larger than San Francisco’s, established a $10 million fund for an effort similar to Campos’s proposal, itself modeled after New York City’s successful program.)

The mayor’s decision—one that at least one observer believes had as much to do with reining in maverick public defender Jeff Adachi as it did with fiscal prudence—could mean that the city’s immigrants won’t universally benefit from due process or representation. This could have the direst of consequences: According to the California Coalition for Universal Representation, would-be deportees are seven times less likely to prevail in their cases when they don’t have a lawyer. The mayor’s decision was disappointing for immigration attorney Niloufar Khonsari, the executive director of San Francisco’s Pangea Legal Services, even though her outfit is one of the designated recipients of Lee’s immigrant-defense funding. San Francisco, she says, could have “set a ceiling” for supporting immigrants. Instead it merely established a “floor.”

“I am a strong believer that the most effective attorneys are not necessarily government. They are attorneys in the community,” counters Lee, himself a former firebrand community attorney. “It’s broader than the public defender. We are a sanctuary city. That’s not gonna change. It’s up to [Trump] how aggressive he wants to be.”

And it’s up to city officials to decide how unified they want to be.

Monadel Herzallah is a Palestinian, born and raised in Amman, Jordan. His was not an easy childhood. In 1970, civil war broke out between the government of King Hussein and the Palestine Liberation Organization; tens of thousands of people were slaughtered. “I immigrated from my country because of war,” says the board member of the Islamic Society of San Francisco. “When you protest, you go to jail. When you are caught organizing, you go to jail.”

The threat of American repression is the worst kind of déjà vu for Herzallah: “People came here to escape all this.” So did he, emigrating in 1978 and reaching San Francisco in 1989. Now, he stresses, the city needs to be a welcoming place for people who don’t fit in elsewhere—more than ever. But his own plight illustrates just how tall an order this is. San Francisco continues to experience an exodus of people of moderate means, many of them people of color, and Herzallah is one of them. After 20 years in the Sunset, his family was “pushed out” of a $1,100-a-month flat after the building was sold in 2008. He now commutes to his job at the San Francisco Unified School District from Fairfield.

And this cuts to the heart of the quandary the Bay Area now finds itself in. It remains to be seen how San Francisco and the rest of the region can be welcoming to our nation’s most vulnerable residents when it’s increasingly unwelcoming to people who’ve lived here for decades and who simply can’t afford the exorbitant housing costs or the pricey childcare, let alone the artisanal toast. Calls for harmony and sanctuary ring hollow for those pushed out of this city by the invisible hand of the market. “We are a welcoming city, but no one can afford to live here,” says Mission district supervisor Hillary Ronen, who succeeded her former boss Campos. “How is that helpful?”

Short answer: It’s not. San Francisco remains a sanctuary city, but just who can find sanctuary here is a vexing question. Land-use brawls will continue to ensnare the city, and potential federal cutbacks won’t make problems easier to resolve.

In one sense the Bay Area will only “win” its fight with Trump’s America, insofar as that’s possible, by acting like the best version of itself. It has to be that harmonious place people think of when they envision carefree days at Lake Merritt or Alum Rock Park; a place that uses its wealth and legal clout to make people’s lives better; a place for people who don’t fit in anywhere else; a place for people to be who they are.

Somewhat disturbingly, many local leaders’ first responses to the ascent of Trumpism have, near uniformly, been to reaffirm the activities they were already advocating for. Steyer continues to call for the sort of actions—registering voters, visiting campuses, haranguing representatives—he was pouring millions into before the election. Lee and his counterparts in Oakland and San Jose, Libby Schaaf and Sam Liccardo, are standing firm on their cities’ extant sanctuary policies. But perhaps we have to do more. No longer, says Oakland organizer and street activist Cat Brooks, can concerned locals “let folks like the people I organize with do the work while they watch on TV.”

Trump’s election proved that America thinks and acts a lot more like Brooks and her fellow Black Lives Matter activists have claimed it does, rather than the way many of the region’s blindsided white liberals assumed it did. Newly woke individuals will have to do more, however, than storming the streets of cities like Oakland, which voted against Trump by a 19:1 ratio. The Office of Congressional Ethics wasn’t spared (for now) by outbursts of coastal virtue-signaling; rather, when GOP representatives tried to euthanize it at the outset of January’s congressional term, a barrage of constituent calls knocked them back on their heels. Randomly blocking Bay Area intersections sends a message of sorts, but, Pangea director Khonsari muses, wouldn’t it be something for thousands of locals to be alerted to an immigration raid via a text-messaging service she’s working on—and purposefully block the homes or places of business of the vulnerable immigrants within?

That’s the difference between merely being an activist and being an organizer. That’s the difference between savoring moral victories and acknowledging that, by definition, moral victories are what you scrape out of a loss.

In November, state senate president pro tempore Kevin de León and assembly speaker Anthony Rendon reached depths rarely achieved in press releases: “America is greater than any one man or party. We will lead the resistance to any effort that would shred our social fabric or our Constitution.” The statement concluded with a notion both poignant and memorable: “California was not a part of this nation when its history began, but we are clearly now the keeper of its future.”

This appears to be more than mere speechifying. In January, the state legislature lawyered up, hiring former attorney general Eric Holder in advance of what promises to be years of siege warfare protecting our state’s rights. He isn’t being paid to rack up mere moral victories. He’s being paid to win, to protect our blood and treasure, and to set strong and lasting legal precedents. “We’ll have a big fight on our hands,” sums up Feinstein. “Whether we can win it or not is unknown.” But far from being depressed by this reality, Feinstein actually seems strangely invigorated by it. California is home to nearly 40 million people, she notes. “That means something. A state this big can do a lot on its own.”

And this, more than anything, offers citizens of the Bay Area resistance both solace and hope. Remind yourself of it. Every day.