Read: Trump’s bizarre California fire threat is serious

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.”

Read: Trump’s fuel-efficiency rollback breaks with 50 years of precedent

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!’”