The race for New York City Public Advocate provides a perfect example of why New York needs instant runoff voting, also known as ranked-choice voting. Twenty candidates at the time of this writing were expected to be on the ballot in the Feb. 26 special election to replace Letitia James since she was elected state attorney general. We can also expect crowded fields in the 2021 Democratic primary for New York City mayor and other local races.

But the traditional first-past-the-post election system risks creating bizarre and unintended consequences, especially in the public advocate race. In a public advocate election with no primary and well over 10 candidates on the ballot, there is a strong possibility that someone will win with less than 20 percent of the vote. Special election turnout in New York City is often under 5 percent, so there’s a real chance that someone could win fewer than 80,000 votes and represent more than 8 million New York City residents. The winner of this election will be next in line for mayor should Bill de Blasio fail to finish his term. In an instant runoff election, however, a winner with only 20 percent of the first-choice votes would also need to be the second or third choice of many voters, and so could realistically claim a mandate from the majority.

Instant runoff voting provides an elegant solution for elections where no candidate wins a majority of the votes in a contest between three or more candidates. On an instant runoff ballot, instead of just picking one candidate, voters rank their first choice, second choice, third choice and so on for as many candidates as they wish. If no candidate wins a majority of the first-choice votes, it triggers an instant runoff: The candidate with the fewest first-choice votes is eliminated and that candidate’s second-choice votes are distributed to other candidates. If those second-choice votes don’t put anyone over 50 percent, then another runoff is triggered, and runoffs continue until someone passes the 50 percent threshold and wins. (If you find this baffling, FairVote.org can point you to a clever demonstration video using Post-it notes.) The important point is that no one has wasted their vote in an instant runoff election, even if their first choice was a candidate who came in dead last. That voter’s second, third or fourth choice can still have an impact on the outcome.

Another problem with first-past-the-post elections is the potential for spoilers. Two candidates who draw on a similar base of supporters can spoil each other’s chances, allowing a less popular candidate to win. There is a possibility of this happening in the public advocate race: New York City Councilmen Jumaane Williams and Rafael Espinal and Assemblywoman Latrice Walker all represent neighboring districts in Brooklyn. This can torment voters; by choosing their local favorite candidate, will they undermine another similar candidate that they also like, and wind up helping someone they oppose?

New York City contains nearly seven times more registered Democrats than Republicans, but if voters divide their support between more than a dozen candidates who identify as Democrats or progressives, there’s a real possibility of victory for the single Republican elected official in the race, City Councilman Eric Ulrich. With instant runoff voting, an outcome like this would be nearly impossible, as voters are likely to pick ideologically similar candidates for their top choices.

It’s possible U.S. Rep. Sean Patrick Maloney’s run for attorney general last year wound up spoiling the Democratic primary for Zephyr Teachout. We can’t know who Maloney voters would have picked for their second choice, but he and Teachout were strong in similar regions, winning every county north of Westchester and Rockland. Under instant runoff voting, if 75 percent of Maloney voters had picked Teachout as their second choice, she would have won an instant runoff against James. Instant runoff voting would eliminate the risk of spoilers, and would encourage candidates to run positive campaigns, hoping to get at least a No. 2 pick from their close rivals.

In first-past-the-post elections, someone with a fairly small base of die-hard supporters can beat a crowded field of more popular candidates, an outcome that is nearly impossible in instant runoff voting. Science journalist Paul Raeburn made the case in Newsweek that Donald Trump might not have won the 2016 GOP primary under instant runoff voting, because Ted Cruz, John Kasich and Marco Rubio combined won 2 million more primary votes than Trump, and it’s possible the vast majority of those voters would not have picked Trump as their No. 2 choice.

Trump’s victory shows how first-past-the-post elections can favor divisive candidates who eke out a plurality, rather than consensus-builders. Instant runoff voting would give candidates an incentive to reach out to a broader range of voters, in hopes of being the second choice for voters backing more marginal candidates.

New York City already has one safeguard against a fringe candidate winning a crowded citywide primary with a small percentage of the vote. If a candidate wins with less than 40 percent, New York City holds another runoff election between the top two candidates. This is an expensive and cumbersome solution, though, asking voters to vote in another primary just weeks after the first. These runoffs are not available in statewide or state legislative elections, for special elections like the current public advocate race, or for New York City Council elections – so it is possible that the next governor of New York could win the primary with less than 25 percent of the vote, especially if the trend toward crowded elections continues. Statewide adoption of instant runoff voting can provide a clear, inexpensive solution to this problem.

The state of Maine, and more than 10 U.S. cities including San Francisco, have already adopted instant runoff voting. A study of San Francisco’s implementation estimates it will save $15 million over 10 years by eliminating traditional runoff elections, despite some one-time expenses in retooling voting machines. Critics warn that instant runoff voting can be complicated and confusing, especially in the rare cases where the candidate who gets a plurality of the No. 1 votes loses to a candidate who wins most of the second-choice votes. But recent increases in political participation in New York point to an electorate that is ready to engage with a more complex and more (small “d”) democratic process. Elected officials including New York City Comptroller Scott Stringer, state Attorney General James and New York City Councilman Brad Lander are pushing for instant runoff voting, along with most local good-government groups.

New York’s new Democratic legislative majority has already passed important voting reforms such as early voting. These legislators could enact instant runoff voting statewide, or New York City could enact it through the 2019 Charter Revision Commission or through legislation. Facing a future where more people will run for office, New York needs instant runoff voting in all elections.

Correction: An earlier version of this post had the incorrect date for the public advocate special election. The election is set for Feb. 26.