This post is part of Polyarchy , an independent blog produced by the political reform program at New America , a Washington think tank devoted to developing new ideas and new voices.

California Democrats are rightly freaking out. Thanks to the Golden State’s “top two” primary system, there are four swing House districts where Democrats’ inability to coordinate on a single candidate in the primary could cost them the election. If Democratic votes are spread across so many candidates that none makes the top two, come November, the only two candidates on the ballot in these districts would be Republicans.

In what promises to be a close national election for the US House, Democrats simply can’t afford to give up four seats that they could otherwise win in a normal Democrat-Republican matchup. But despite aggressive efforts, the party is (not surprisingly) having a very hard time working around reform that was designed to make it harder for parties to operate.

The idea of the top two primary was to encourage more moderate candidates by getting rid of party primaries that supposedly produced extreme candidates. But using the top two primary to achieve the goal requires a level of knowledge and strategic coordination among voters that was never feasible. The best assessments are that top two has produced far more confusion than moderation, including the dubious tactic of parties running “loser” candidates under the opposing party’s label. Primary turnout has only fallen.

And if Democratic voters throw away any House seats on Tuesday because they couldn’t agree on a single candidate, it won’t be the first time something like this has happened. As a recent Los Angeles Times article put it, “Unusual election outcomes are the new normal with California’s top-two primary rules.” In these elections, the number of candidates, rather than any one candidate’s “moderation” or willingness to compromise, becomes the key variable.

There is a better option. California could adopt ranked-choice voting for congressional elections, replacing the top-two primary and eliminating the need for a primary altogether. This would make it easier for voters to pick their preferred candidate without having to engage in complicated strategic voting. Instead of Democratic voters having to all agree on a single candidate, they could rank their preferred Democratic candidate first, and then rank other Democratic candidates in order of preference.

In a ranked-choice voting system, if one candidate has a straight-up majority, that candidate is the winner. If no candidate has a first-round majority, the last-place finisher is eliminated, and anybody who voted for that candidate gets their votes transferred to their second choice. This process repeats until one candidate gets a majority. What it means is that if the majority of voters in a California Congressional want a Democrat, they will get a Democrat, since support for losing Democrats would be transferred to better-performing Democrats. In ranked-choice voting, there is no “spoiler” effect.

Californians need only look to San Francisco (or Oakland) to see how ranked-choice voting works: quite well. Ranked-choice voting generally improves civility of campaigning. Voters in cities with ranked-choice voting report that campaigns became less negative after ranked-choice systems went into place. That’s because the basic strategy under ranked-choice voting is to try to appeal broadly and say, “I’d like to be your first choice, but if I can’t be your first choice, I’d like to be your second choice.”

In ranked-choice voting, we tend to get soft alliances among candidates. This can include cross-partisan alliances, encouraging moderation. By contrast, there’s a reason California top two primaries are getting increasingly nasty. When there is no incentive for alliance, there is every incentive for attack.

Political experiments are useful. Thanks to California’s experience, we now know that the top two primary system is a failed one. Other states can learn from that experience. Hopefully California can as well.