Americans unhappy about having to choose between Donald Trump and Hillary Clinton for president face a familiar problem. Voting for one of the minor-party candidates—such as the Libertarian nominee Gary Johnson or the Green nominee Jill Stein—will enable some people to vote for a candidate whom they enthusiastically support; yet, as a practical matter, doing so is equivalent to not voting, because the minor-party candidates have no realistic chance of winning the election.

A progressive who thinks that Stein is substantially preferable to Clinton but that Trump would be a disaster risks aiding Trump by voting for Stein. Conversely, a conservative who thinks Johnson is substantially preferable to Trump but that Clinton would be a disaster risks aiding Clinton by voting for Johnson. As Ralph Nader arguably proved in 2000, in American politics, third-party candidates chiefly play the role of spoiler.

To be sure, that is not all that third-party candidates do. Where the major parties are not addressing some issue about which a substantial constituency has strong feelings, a third-party candidate can place that issue on the national agenda. In 1992, for example, Ross Perot’s campaign influenced Bill Clinton’s administration, mostly with respect to the attention paid to deficit reduction. More broadly, as the great historian Richard Hofstadter wrote in his classic 1955 book The Age of Reform, “Third parties are like bees. Once they have stung, they die.”

The logic of our first-past-the-post electoral system implies that except in times of transition, only two parties will be viable. After the initial tumult giving rise to the party system in the late eighteenth and early nineteenth centuries, transitions themselves have been extraordinarily rare. The last one occurred on the eve of the Civil War, when the Whigs gave way to the Republicans. Realistically, we are stuck with the two parties we have.

Some supporters of third-party candidates are too naïve or stubborn to accept that fact, but others are clear-eyed. They want to vote for a third-party candidate with the Hofstadterian goal of “stinging” the major parties, so that their issue—whether it is marijuana legalization, defense spending cuts, campaign finance reform, or something else—is addressed. Other realistic third-party voters want to register a protest against the particular nominees of the major parties.

Can they do so without risking voting for a spoiler? In recent elections, compromise schemes have been tried. A progressive in a swing state votes for the Democrat, while one in which the outcome is a foregone conclusion votes for the Green, for example. But such an approach undercounts third-party support and leaves some voters pulling the lever for the “wrong” candidate.

There is a better way. “Instant runoff voting” (IRV), which I describe below, has been successfully implemented in various jurisdictions. It allows third-party voters to have their cake and eat it too. People who support third parties should join hands with the two major parties in promoting it.

What Is Instant Runoff Voting?

In IRV, a voter ranks as many of the candidates for a particular office as he or she wishes. In a state in which the Libertarians and Greens have qualified for the ballot, a third-party-leaning progressive might vote: (1) Stein; (2) Clinton; (3) Johnson. A third-party-leaning conservative might vote: (1) Johnson; (2) Trump.

Under IRV, the votes are tallied in stages. If no candidate wins a majority of first-place votes, then the candidate receiving the fewest first-place votes is eliminated and his or her votes are redistributed to the candidates earning second-place on those ballots that listed him or her first. For example, let’s say that the raw vote in some state is Clinton (44%), Trump (42%), Johnson (8%), Stein (6%). Stein would be eliminated and her second-choice ballots would then be redistributed. If after that procedure, there is still no candidate with a majority, the next-worst finisher (following the initial reallocation) is dropped, and his votes are redistributed to the second-place choice on his ballots (or the third-place choice if the second-place choice has also been eliminated). Eventually, a winner emerges.

IRV Is Win-Win

IRV benefits third parties. Voters who would vote for a third party were it not for the risk of supporting a spoiler have the comfort of knowing that they can vote their top choice without thereby inadvertently aiding their last choice. True, purists in the “never Trump” or “never Clinton” camp might still vote for only Johnson or only Stein, but at least some voters will rank more than one candidate. A ballot with Stein as the first choice and Clinton as the second choice sends a clear message about the voter’s preferences, in a way that a hold-your-nose-and-vote-for-a-major-party-nominee ballot does not. Under IRV, a third-party voter can communicate that her secondary support for a major-party candidate is a choice of lesser evils.

But if IRV is good for third parties, doesn’t it follow that it is bad for the major parties? The short answer is no.

Voters who otherwise would have reluctantly pulled the lever for a major-party candidate will ultimately count towards that candidate’s total, after distant finishers’ first-place votes are transferred to second or subsequent choice candidates. Meanwhile, under IRV some voters who otherwise would have simply voted for a minor-party candidate will cast a second-choice vote for a major-party candidate. IRV thus greatly reduces the risk of a spoiler candidacy, even as it confers valuable information to the major parties. Knowing that, say, twenty percent of the voters preferred someone other than one of the two major-party candidates will act as a wakeup call to the major parties to compete to co-opt—and then enact—the program that the minor-party candidate or candidates prefer.

To be sure, in any particular election, it will sometimes be in the interest of one or the other party to have a spoiler on the ballot. Where a strong third-party candidate runs to the left of the Democratic nominee, the Republicans will want that candidate to siphon support from the Democrat. Likewise, the Democrats would like to see a right-leaning third-party candidate play spoiler to the Republicans.

But neither major party can know in advance whether it will benefit or suffer from a third-party run, and even the effects of particular third-party candidacies can be unpredictable. Candidates take a range of positions on a variety of issues. They do not align on a one-dimensional scale from left to right. For example, although Johnson outflanks Clinton to the left on foreign policy, he outflanks her to the right on domestic issues (with the exception of marijuana legalization and a few other matters). In general, it is likely that strong third-party candidates will fill ideologically heterodox niches, precisely because third-party candidacies tend to be strongest when the major parties are both neglecting some important set of concerns.

There are, of course, significant obstacles to adopting IRV. Because of the decentralized nature of American elections, it would need to occur state by state. And voters would need to be educated in how it works. However, unlike some other proposed measures, such as campaign finance reform, where powerful interests oppose change, there would appear to be no systemic obstacle to adopting IRV.

IRV would hardly solve all of our political problems, much less our policy challenges. It is not the “political revolution” that Senator Bernie Sanders favors. But it would go some way towards addressing at least one of the ways in which our political system is (as Donald Trump disingenuously and cynically complains) “rigged” against outsider views.