Voters in New York City passed a measure Tuesday to adopt a ranked-choice voting system in some future elections.

The new system, which passed with overwhelming support, allows voters to mark down not only their first choice in a race, but also who they'd prefer to win if their top candidate doesn't make the cut.

A candidate who wins more than 50% of first-place votes would be declared the winner outright. If no one gets 50%, the candidate with the fewest first-place votes is eliminated. The votes of the people who favored that eliminated candidate are then transferred to their second-choice candidates, and the vote is counted again. The process continues until one candidate has a majority of votes.

RELATED: Maine to become first state to allow ranked-choice voting for president

RELATED: A Washington group is pushing for ranked choice voting. What is it?

The system, also known as instant-runoff voting, is already used in places including San Francisco , Minneapolis and Cambridge, Massachusetts, as well as in Maine, But it will now be on its biggest stage by far in New York City, where 2.1 million voters cast ballots in last year's midterm elections.

The system will only be used in primary elections and special elections for the positions of mayor, city comptroller, public advocate, borough president and City Council. It will start in 2021.

Ranked-choice voting wouldn't be used in general elections, but in New York that can be a moot point. The city is heavily Democratic, and elections are frequently decided in the primaries.

Backers like the system because it forces candidates to broaden their appeal beyond a narrow base in hopes of being chosen second or third by other voters. It can also reduce the chance that a fringe candidate, deeply disliked by a majority of voters, could triumph in a crowded field.

Critics of the system call it unconstitutional or confusing.

About a dozen U.S. cities have used ranked-choice voting in certain elections, according to advocacy group FairVote. It's spreading to at least five more cities including Las Cruces, New Mexico, and Eastpointe, Michigan, in this month's elections.

Nearly half of state legislatures considered bills concerning ranked-choice voting this year. New Mexico lawmakers passed a law that officially paves the way for the system in local elections.

But such bills have largely stalled or failed at the state level. California's Democratic Gov. Gavin Newsom vetoed a bill last month that would have allowed more cities, counties and school districts in California to use the system.

Still, supporters have been emboldened by its rollout in primaries and federal races in Maine, where the system first approved by voters in 2016 has survived a legal challenge and skepticism.

Supporters say the measure could save New York City the trouble and expense of mounting runoff elections, now required in some races if the leading candidate wins less than 40% of the vote.

Because it makes the vote count more complex, the system can present challenges for news organizations aiming to announce winners as soon as possible after polls close.

TEGNA Staff contributed to this report.