Factbox-What you need to know about New York City's mayoral contest

By Joseph Ax

NEW YORK (Reuters) - Tuesday's primary election for New York City mayor could be the most momentous in a generation, as the Big Apple struggles to emerge from a devastating pandemic. Here's what you need to know:

HIGH STAKES

The most populous U.S. city is recovering from a coronavirus pandemic that killed more than 30,000 residents and infected nearly one million, but stark challenges remain. It suffers from economic inequality, a lack of affordable housing, a growing homelessness problem and effectively segregated schools.

Meanwhile, a wave of shootings has put public safety at the core of the campaign. The election's outcome could offer fresh evidence of how the Democratic Party is navigating the thorny issue of combating crime, a year after nationwide protests over police brutality gave rise to calls of "defund the police" from many progressive voices.

FLUID RACE

The race has been fluid, with as many as eight out of 13 Democratic candidates seen as viable and polling data in relatively short supply.

Brooklyn Borough President Eric Adams, a former police captain, appears to be the front-runner. But civil rights attorney Maya Wiley, former presidential candidate Andrew Yang and former sanitation chief Kathryn Garcia are all within striking distance in public surveys.

The winner of the Democratic primary in all likelihood will prevail in November's general election. Democratic voters outnumber Republicans by more than six to one, and the Republican candidates vying for their party's nod on Tuesday are not considered a threat to the Democratic nominee.

NEW VOTING SYSTEM

Adding to the uncertainty is a new system known as ranked-choice voting, or RCV, in which voters can rank up to five candidates in order of preference.

RCV operates as a series of instant run-offs: if no candidate exceeds 50% of the vote among first choices, the candidate in last place is eliminated, and that person's votes are re-allocated to the voters' second choices.

The tabulation continues, round after round, until there are two candidates left, giving the one with the majority the victory.

WAITING GAME

Initial results showing voters' first-choice picks are expected Tuesday night. But the final vote tally and winner may not be known until mid-July, according to election officials.

Absentee ballots are accepted until June 29 as long as they were postmarked by Tuesday. In addition, voters are allowed to fix any ballot errors up until July 9.

On June 29, the city Board of Elections plans to run its first round of ranked-choice results, which will show who would have won based on in-person votes only.

One week later, the board will issue a second round of results that includes all absentee ballots processed as of that day. It will continue to do so once a week until all ballots are counted, with final results expected the week of July 12.

(Reporting by Joseph Ax; Editing by Colleen Jenkins and Aurora Ellis)