President Trump gestures to California Governor-elect Gavin Newsom as Governor Jerry Brown stands by, at the scene of forest fires in Paradise, California, in November 2018.Evan Vucci / Associated Press

LOS ANGELES—From the moment Donald Trump took office, California has been ground zero for the resistance against him and his administration, in terms of both grassroots citizen activism and legal and administrative action by its Democratic-dominated state government. But since the inauguration of Governor Gavin Newsom in January, the Golden State has often seemed to be in a state of total war with the White House.

At the same time, California’s once-mighty Republican Party—which gave the nation Earl Warren, Richard Nixon, and Ronald Reagan—is at war with itself, and weaker than it’s been in decades. The GOP’s new state-Senate leader was once quoted as suggesting that California’s epic drought was divine punishment for abortion, and last weekend the party elected its first female and first Latina state chair, only after a bitter internecine fight that left its conservative wing enraged.

Republicans now hold just seven of California’s 53 congressional seats, and fewer than a quarter of the seats in both houses of the state legislature. That lopsided math has left the country’s most populous state acting more like an independent entity than at perhaps any time since the Bear Flag Revolt’s month-long rebellion against Mexican rule in 1846, in the pre-statehood era.

Now California is boldly pursuing its own policies on climate change, automobile emissions, immigration, and trade—all sharply at odds with Trump’s. State Attorney General Xavier Becerra has sued the administration 46 times in the past two years, most recently over Trump’s declaration of a national emergency to finance his border wall with Mexico.

The latest flash point in the long-running battle between Sacramento and Washington, D.C., is Trump’s recent cancellation of nearly $1 billion in federal transportation grants for California’s long-stalled high-speed-rail project, after Newsom infelicitously suggested in his State of the State speech last month that he would abandon the most ambitious goal of the project, linking San Francisco and Los Angeles. Newsom later insisted he’d been misunderstood and only intended to say he would focus first on a route through the state’s Central Valley, from Merced to Bakersfield. But Newsom’s announcement was excuse enough for Trump to withhold further funds for the project, and seek to claw back the $2.5 billion already spent.

“Whole project is a ‘green’ disaster,” Trump tweeted, while Newsom promptly rejoined, “Fake news,” adding, “This is CA’s money … we’re not giving it back.” In succeeding days, Newsom’s Twitter account went on to accuse Trump of “manufacturing a crisis” at the border and “declaring a made up ‘national emergency’ in order to seize power.” He added: “Our message to the White House is simple: CA will see you in court.” Still later, Newsom added, “Instead of fighting the actual threats facing Americans, the President has chosen to undermine our Constitution and fan the flames of nativism & xenophobia. This is not a ‘national emergency.’ It’s a national disgrace.”

The merits of the case aside—the issue of the rail funds is likely to be hashed out in a long court fight—Newsom’s combative stance is good politics in a state where Democrats themselves are torn between the more moderate instincts of their senior senator, Dianne Feinstein, and more firebrand politicians such as Newsom and Senator Kamala Harris.

“There are two viable parties in California,” says Dan Schnur, a professor at the University of Southern California’s Annenberg School for Communication and Journalism and a former longtime GOP strategist who is now an independent. “It’s just that they both happen to be Democratic parties: a centrist, pro-business Democratic Party and a very progressive party that don’t agree on a lot of things. But they’re in perfect lockstep on Donald Trump.”

Newsom himself acknowledged as much to the president in person, as they toured the scenes of the state’s devastating wildfires last fall with Newsom’s predecessor, Jerry Brown, and others, according to an official who was with them that day. After spending several hours together, the official recalled, Trump told Newsom that he had often mocked the governor-to-be in his rallies, adding, “‘Now that I’ve met you and like you, I can’t bring you up anymore.’ And Gavin’s like, ‘No, no, no! Keep bringing me up!’”

But Newsom also has to walk a fine line, because California remains dependent on federal disaster aid for the wildfires, mudslides, and other calamities that have befallen the state in recent months. Through his good working relationship with House Minority Leader Kevin McCarthy, Newsom has a helpful back channel to the White House when he needs it. On a trip to Washington this week for the National Governors Association conference, he managed a quick handshake and a brief chat with Trump at a White House dinner, but then quietly made the rounds of the Interior Department and the Federal Emergency Management Agency to press his state’s case. “Let me take my partisan hat off,” Newsom told the Los Angeles Times. “People could not be more cordial, more respectful. I’ve been doing this long enough. You can sense sincerity and insincerity.”

For his part, Trump also acknowledges that his personal encounters with Newsom are different from their Twitter jousts. “He called me up the other day, let’s say four weeks ago or so,” Trump told the crowd at the Conservative Political Action Conference outside Washington on Saturday, “[and said] ‘I just want to tell you, you’re a great president and you’re one of the smartest people I’ve ever met.’ That’s what he said.” Trump added, “Will he admit it? No, I doubt it.” Then the president went on, “And then he did start talking about, in all fairness, additional money for the fires, which is okay. We have great talks. I like him.”

Still, Trump’s unpopularity in the state remains widespread. Just 36 percent of likely voters statewide approved of the president’s job performance in a January poll by the Public Policy Institute of California.

“For Gavin to be a national leader of the resistance certainly doesn’t hurt whatever ultimate ambitions he may have,” says the longtime Democratic consultant and speechwriter Bob Shrum. If Newsom’s handling of the high-speed-rail announcement was botched, “this won’t harm him at all,” Shrum adds. “Being attacked by Trump in California is not a disadvantage, to put it mildly.”

Trump’s broad unpopularity in a state that is rapidly growing younger and more diverse has also accelerated the decline of a state Republican Party that was already shrinking and is now a third-place entity in voter registration, behind both Democrats and those who decline to state a party affiliation. Those realities helped to account for the November midterm losses that cut the state’s GOP congressional delegation in half, and left party regulars feuding over the proper way forward: double down on Trump and hard-right policies, or strive for a more welcoming tone. Since the midterms, the results have been decidedly mixed.

In January, the Republican caucus in the state Senate chose as its leader Shannon Grove, a socially conservative legislator from Bakersfield, McCarthy’s hometown. “For the sake of millions of forgotten Californians, our caucus will work to navigate government with pragmatism and compassion, and negotiate with fearlessness,” Grove vowed at the time. In 2015, Grove was quoted as having suggested that California’s multiyear drought was God’s retribution for abortion. She denied the account, but went on to say that “God’s hand is in the affairs of man.”

Just last weekend, at its state convention in Sacramento, the party chose Jessica Patterson as its chair. Patterson is a 38-year-old veteran political operative and the chief executive of California Trailblazers, a group that trains GOP legislative candidates. Patterson, who is close to McCarthy, won with 55 percent of the vote, beating out two other, more hard-line candidates, former Assemblyman Travis Allen and a longtime party activist, Steve Frank. Patterson had argued that the party should focus on its Democratic opposition and welcome all stripes of Republicans, while Allen and Frank contended that Patterson was part of the status-quo leadership that had presided over the party’s declining fortunes. After the vote, Allen sounded a grim note. “We can only hope the Republican Party stands to fight again,” he insisted.

Schnur calls Patterson’s election a “good, small step in the right direction,” adding, “It’s better to be a mile outside of hell, heading out, than still in hell.” But Bill Carrick, a longtime Democratic consultant here who advises Feinstein and Los Angeles Mayor Eric Garcetti, says the outcome is also likely to further inflame grassroots conservative activists who feel that their side lost. “In some ways, this has probably just aggravated the activists,” Carrick says.

California has its share of big problems: a severe shortage of affordable housing (and intractable homelessness), underfunded pension liabilities for public employees, aging dams and other infrastructure that is particularly vulnerable in a landscape prone to earthquakes, a state budget that is still too reliant on personal income-tax receipts, which shrink in hard times, and a bankrupt major public utility facing multibillion-dollar lawsuits over its equipment’s role in sparking wildfires, to name just a few. But by most standards, the state has been on something of a roll, and that reality, coupled with its sheer size, gives the state the power it has so often had—for good or ill—to set the path for the rest of the country, much of which is ultimately going to look more like California than it does now.

“In the era of Trump, this has positioned the state as a key point of resistance: bold enough to believe that the future is once again being forged on the left coast and rich enough to stand up to a federal government focused on dragging America back to an era in which greatness was measured by who was excluded from opportunity,” writes Manuel Pastor, a sociologist at the University of Southern California, in his recent book, State of Resistance: What California’s Dizzying Descent and Remarkable Resurgence Mean for America’s Future. “Texas was once determined to sue the previous president, Barack Obama, on nearly every policy and continues to boast that it is the true national alternative going forward. But its model—based on cheap energy, urban sprawl, and political disenfranchisement—does not seem like a recipe for the national long haul. What California is stumbling toward—still evolving, still incomplete, still vulnerable to its own reactionary voters—is a path to a new American future, one in which the nation becomes more prosperous and more sustainable, more diverse and more cohesive, more engaged and more agreeable. It matters that the state gets there and it matters that the country learns from its path.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.