For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

On Saturday, about 1,500 members of the California Republican Party gathered in Sacramento, California, for their 2019 convention’s main event: a debate between three candidates locked in a divisive battle to become the new party chair, a position that will help shape the future of the beleaguered state party as it attempts to revive itself after being brutalized in the November elections.

Even before the debate properly kicked off, the rift within the party bled into the open. Shawn Steel, the state’s Republican National Committeeman and an unabashed Trump supporter, took to the podium before a largely white crowd ideologically differentiated by their attire—”Make America Great Again” hats and Trump 2020 pins, blue suits and tweed blazers, jeans and “God, Guns, and Guts” shirts. He voiced his support for Jessica Millan Patterson, a 38-year-old acolyte of House Minority Leader Kevin McCarthy who would become the new party chair—and the first Latina to hold that position—the following day. “She’s one of the toughest people I’ve ever met,” Steel declared.

“RINO!” someone shouted from the back of the hall. “I second that!” yelled someone else, who then booed.

That Steel, a self-proclaimed “red-meat conservative,” might be seen as a Republican in name only highlighted how entrenched the warring factions within the party have become. The fight for the soul of the California GOP has pitted pro-Trump hardliners against “establishment” Republicans, whom they blame for the party’s recent near-annihilation at the ballot box and its anemic numbers in the voter rolls.

Patterson was up against former Huntington Beach Assemblyman Travis Allen, a charismatic, pro-Trump firebrand, and Stephen Frank, a longtime party activist with deep ties to the tea party faithful. Allen and Frank represented separate slices of the base who suspected Patterson had been hand-picked for the chairmanship by party insiders. She made a concerted effort to appease her detractors over the weekend, calling for unity and declaring during the debate that the real “enemy is not a single person in this room—the enemy is there about 500 yards away in that white building,” referring to the Democratic-controlled state Capitol across the street. “Every single day they are trying to take away our freedom and our liberty.”

She didn’t win over everyone. After the delegates elected Patterson as the next party chair, with 55 percent of the vote (Allen got 31 percent, Frank got 15), her opponents’ supporters fumed. Outside, a guy wearing a Travis Allen sweatshirt flipped off the convention center and said, “I’m done! Whatever this is—I’m done! I’m sick of it.” Another man in a MAGA shirt stormed away, yelling, “What a bunch of shit!” Catherine Hart, an Allen supporter who was swathed in American-flag-patterned attire, declared that the election was “rigged.” “California is dead,” she told me.

Patterson’s fans say her election may be the first step in keeping the state party alive. The day before the vote, Mike Madrid, a GOP consultant and Never Trumper who believes the party must reject the president’s “nationalist” policies, put the choice in stark terms. “If Jessica wins, it means there is still a pulse—however faint—but a desire among delegates to actually be relevant,” he said. “But if it’s Travis Allen or Steve Frank, it’s not just throwing in the towel and surrendering—it’s literally making a kamikaze run and blowing yourself up.”

In November 2018, California Republicans lost every race for statewide office as well as every House seat in Orange County, a historical bastion of conservatism. In January, Assemblyman Brian Maienschein of San Diego quit the GOP to join the Democrats, because, he said, “Donald Trump has led the Republican Party to the extreme on issues that divide our country.” Registered Republican voters now make up a meager 25 percent of the California electorate. Had Allen—a charismatic but polarizing figure—won the chairmanship, at least three assembly members were ready to follow Maienschein’s example and defect, according to state Assemblyman Chad Mayes of Yucca Valley, an outspoken Trump critic.

The differences between the candidates for party chair may have been less about ideology, however, than style. Patterson’s alleged moderateness can be chalked up to the company she has kept rather than her positions, says Sue Caro, the state party’s former regional vice chair of the Bay Area. Previously, Patterson worked on the gubernatorial campaigns of former Gov. Arnold Schwarzenegger and eBay CEO Meg Whitman, and she runs California Trailblazers, which recruits Republican candidates for state offices. Her ties to McCarthy hurt her with pro-Trump diehards despite the minority leader being one of Trump’s top allies in Congress. Her stance on Trump isn’t entirely clear. After her election, when asked whether she would invite Trump to campaign for California Republicans, she sidestepped: “We’ll have to see how it works.” She has called on the party to be more inclusive and welcoming to people of color and members of other groups who have felt alienated by Republicans.

Frank and Allen did not bother with such niceties. Frank, who has been a Republican activist since the ’60s, spoke at a “Build the Wall” dinner hosted by the tea party the night before the vote. There, he told me that the thing he liked the most about being a machine-gunner during the Vietnam War was that it was “legal to kill communists.” (It was a joke—I think.) Earlier in the day, Allen hosted his own “Build the Wall” rally on the steps of the Capitol. It was attended by members of the Proud Boys, which was recently designated a hate group by the Southern Poverty Law Center. Speakers led chants of “lock her up!” and denounced the “communist” Democrats who are ruining California.

While Frank riffed about how Republicans need more candidates and a serious get-out-the-vote campaign, Allen fired up crowds with bombastic speeches that were scarce on details. When he was asked during the debate what his greatest weakness is, he responded, “If I could change one thing, it would be to have even more energy and more passion for my state…I wish there was more of me to give.” Earlier, he told attendees that he was the only candidate who “has stood on a stage with Gavin Newsom and defeated him,” conveniently skimming over the fact that his 2018 gubernatorial bid never made it past the primary, much less to a showdown with the new Democratic governor.

When the results of the chair vote came in Sunday, Allen looked genuinely deflated for the first time during the weekend. “I’m surprised,” he said. He offered a short statement—”We can only hope that the Republican Party starts fighting again for the good of all Californians”—and then left the room.

Just as they chose Patterson as the first Latina to lead the party, the delegates elected Peter Kuo, a businessman and immigrant from Taiwan, to be the party’s vice chair, and chose Greg Gandrud, who is openly gay, as the party treasurer. Cassandra Pye, a consultant who worked in the Schwarzenegger administration, told the Los Angeles Times, “We’ve been a party that’s essentially got a face that is primarily white and male and old…It’s time we turn the party over to another generation and to some folks that look more like the rest of California.”

This shift in leadership marks the beginning of a “rebirth,” said party communications director Matt Fleming. “We’re rising like the phoenix,” he joked. Madrid was more cautious, but allowed, “It shows that competency matters over style. There’s still a long way to go, but a strong majority said they get it.”