Initial Election Night results in the New York City mayoral contest seemed to declare the race all but over.

Brooklyn Borough President Eric Adams pulled in 31.7 percent of the vote, good enough for a comfortable lead over Maya Wiley’s 22.3 percent and Kathryn Garcia’s 19.5 percent. Shortly after, Adams proclaimed himself the future of the Democratic party and spoke of his mandate.

Ah, but the race was not over!

That’s because this time around, the primary utilized ranked-choice voting for the election, a method that requires voters to rank their candidate preferences from top to bottom. The idea is that more voters will be satisfied with the result even if their preferred candidate doesn’t come out on top.

In a “normal” race, election officials simply count the ballots, adding up those who voted on Election Day with those who voted early or by mail. While the results are usually quick, crowded primaries in “first-past-the-post” systems have the potential to elevate fringe candidates, even when few prefer them as their top choice.

Ranked-choice elections, in contrast, utilize an iterative process that can take a bit longer to tabulate, but they increase the odds that more palatable candidates rise to the top, giving all voters a more meaningful choice. Maine has now used the process for multiple election cycles, and Alaska recently passed the reform in November, along with innovative primary reforms.

With extra steps when counting ballots, ranked-choice elections may require a bit more patience than we’re accustomed to in the 24-hour news cycle. And, like any election, it also requires competent election officials.

Unfortunately, New York City’s election rules and administrators made the process painfully slow and unnecessarily difficult. First, the election was complicated by the fact that absentee ballots need only be postmarked by Election Day and therefore could be received a week later—meaning that ranked-choice counting couldn’t commence until all those ballots were received. Further, the New York City Board of Elections erroneously included test ballots in its count, a mistake that raises concerns about whether an election board with a spotty history of conducting elections can be trusted to handle any voting system.

Nevertheless, now that all ballots are in and the final count is complete, the mayoral primary should be considered a win for Eric Adams, for New York City voters and for ranked-choice voting more generally.

Beyond the obvious electoral victory for Adams, the new ranked-choice primary validated that he was not only the most popular first-choice candidate, but that a majority of New York City voters preferred him as the field winnowed. In a city where primaries have been famously tight, ranked-choice voting proved that Adams had broad support from Democratic voters.

Meanwhile, the voters enjoyed an increased voice in the selection of their next mayor. More than one in four voters selected a candidate who was not predicted to be within the top three. These votes would normally have been considered “wasted” on also-ran candidates. But not this time. Under ranked-choice voting, these voters saw their ballots reallocated to their next favorite choice. This freedom to vote according to conscience sets apart ranked-choice voting from traditional “first-past-the-post” systems and is an absolute win for voters.

Finally, the mayoral primary represented a win for ranked-choice voting itself. Throughout the election, skeptics worried that ranked-choice voting would interfere with the election’s legitimacy. And yet, once all the votes were properly counted and candidates were eliminated, ranked-choice voting did exactly what it was designed to do.

Take the coalition between former presidential candidate Andrew Yang and eventual runner-up Garcia. Yang urged his supporters to rank Garcia second on their ballots, ahead of Adams and Wiley. While Yang received less than 12 percent of first ballot voters, his supporters helped push Garcia ahead of Wiley into second place. While Garcia ultimately did not win, these second-choice Garcia voters are certainly responsible for tightening the race. The Yang/Garcia deal is the poster child for how ranked-choice voting can encourage candidates to work together, rather than undermine one another.

To be clear, ranked-choice voting alone won’t solve all of our electoral problems. In a world in which the gap between the major parties only seems to be increasing, it’s hard to imagine Republicans or Democrats eager to rank their rivals as acceptable alternatives. But that issue is less of a concern in primaries like the recent New York City race, or general elections like Alaska’s “top four” system that can lead to more than one candidate from each party on the ballot.

Only time will tell whether ranked-choice voting and reforms like it will continue to take hold nationwide, but one thing is already clear—it’s making our elections work better for everyone.