Mariel Garza is executive editor of the Los Angeles-based publication Golden State and a contributing Globe Opinion writer.

California has been reliably deep blue, but could a crowded field of Democratic gubernatorial candidates create the path for a Republican win? I know it sounds like a long-shot, but the next governor of deep-blue California could be a Trump-loving Republican. The odds aren’t great, but the math does work. Let me explain.

California is one of a handful of states that have done away with partisan primaries. Candidates from all parties — Republican, Democratic, Libertarian, Green, etc. — appear on the same primary ballot. The two candidates who receive the most votes proceed to the general election in November, regardless of their party affiliation.

That means the crowded field of Democrats — eight at the moment, with two more considering jumping in — hoping to replace Governor Gavin Newsom in 2027 could dilute the Democratic vote and hand the election to two Republicans.

It has happened before. In 2022, so many Republican candidates were on the ballot for a District 4 state Senate seat that they divided the vote and sent two Democrats to the general election in a district where most voters were registered Republican.

There’s been some hand-wringing over that happening to Democrats in June, typically by those who never liked top-two primaries. I don’t think it’s a likely outcome. First of all, Californians lined up in November to cast ballots in an off-year special election in order to send a steaming dish of redistricting retribution to President Trump. Furthermore, some of the lesser-known Democratic candidates will probably drop out in the next month or two as their funding and support dry up. But the fact that such an unusual gubernatorial outcome could happen is good for democracy.

When California voters approved the top-two primary system in 2010, it was with the intention of shaking things up, and it did. Primary races have become more competitive, favoring moderate candidates with broad appeal across political lines rather than those who represent the more extreme policies of their party (former House speaker Kevin McCarthy notwithstanding). Voter turnout in primaries has also increased, presumably because there’s more riding on the outcome.

That’s not just the conclusion I’ve drawn from watching the past seven election cycles; it’s backed up by several academic studies in recent years analyzed by the Unite America Institute, a nonprofit group that advocates election reform policies. Since going into effect in 2012, studies have found that California elections have become more competitive and produced winners who were measurably more moderate than those from states with closed primaries.

“It is evident that Top Two in California has increased voter participation and electoral competition, while decreasing polarization. That is a recipe for a more representative and functional government,” according to the report.

Political parties don’t like the open primary structure because they lose control. That’s kind of the point. And California’s transition to an open primary would likely not have happened had it not had the support of popular former governor Arnold Schwarzenegger, the last Republican elected statewide, who also backed an independent redistricting commission.

In theory, the top-two system gives voters of the minority party — that’s the GOP in California — more say in elections that their party was never going to win by allowing them to choose the more moderate candidate from the opposing party in primaries.

More significantly for these fraught times, you can’t get primaried in California. Imagine how differently 2025 may have gone if no member of Congress had to worry about being primaried by their own party leadership if they stepped out of line.

It would have meant that Representative Marjorie Taylor Greene, a MAGA Republican, might not have quit Congress this week rather than face a humiliating primary challenge after parting ways with the president over the Epstein files.

That may not be a great selling point for open primaries to Democrats, but perhaps this is: If Georgia had open primaries in 2020, Greene might not have been elected in the first place.

Closed primaries make it nearly impossible for the kind of independent, free-thinking elected officials that American voters say they want to succeed.

Former senator Jeff Flake of Arizona, a centrist Republican and critic of President Trump who chose not to run in 2018, explained why in a recent interview with The New York Times: “The president has been able to say, in any Republican seat in the country, ‘I can get a primary opponent for you if you don’t do what I say.’ That’s a powerful political incentive.”

California’s top-two primary is not perfect, as the governor’s race shows. And it hasn’t done any favors for third parties, which worried they would be further marginalized in an all-comers primary. And that appears to be the case, though only by a tiny margin.

But that’s a reasonable trade to me if it reduces the toadies in Congress.