In a speech to supporters late Tuesday, Brooklyn Borough President Eric Adams relished his initial lead in the race to become New York City's next mayor, saying he was proud to have been many voters' “first choice."

But under the city's new ranked choice election system, the ultimate winner in the Democratic primary might be the candidate who most voters pick second, third, fourth or fifth.

With hundreds of thousands of votes set to be redistributed to different candidates in future rounds of tabulation that begin next week, it remained possible for two other candidates, Maya Wiley or Kathryn Garcia, to come out on top.

Early returns show that Adams, a former police captain who also served in the New York state Senate, was the first choice of 31% of those who voted in person on Tuesday or during the early voting period, compared to 22% for Wiley and 20% for Garcia.

Yet it was not clear Wednesday whether the lead would hold.

An undetermined number of mail-in ballots — possibly as many as 200,000 — have yet to be counted.

And victory could hinge on where people who voted for losing candidates ranked Adams, Wiley or Garcia on their ballots, or whether they bothered to rank anyone at all.

There were good signs and bad signs for Adams, according to elections data analyzed by The Associated Press.

Overall, in the ballots counted so far, he was ranked on more ballots than any other candidate.

About 474,000 voters ranked him in their top five. That compares to 454,000 voters who ranked Garcia and 443,000 who ranked Wiley.

However, Garcia and Wiley both did better than Adams among the ballots that could be redistributed in the ranked choice voting system.

For example, 298,000 voters ranked Garcia second, third, fourth or fifth on their ballots. Wiley was ranked on 265,000 ballots in which she was not the top candidate, while Adams was ranked on 221,000 ballots in which he was not the top candidate.

The numbers suggest that any of the three candidates could ultimately win.

Under the version of ranked choice voting that New York City adopted in 2019, voters in primaries and special elections can rank up to five candidates in order of preference instead of choosing just one.

If one candidate is the first choice of a majority of voters — which did not occur in Tuesday's mayoral primary — that person wins outright.

If nobody hits the 50% threshold, ranked choice kicks in, with vote tabulations done in rounds. In each round, the candidate in last place is eliminated and votes that ranked that candidate first are redistributed to those voters’ second choices.

The process repeats until there are only two candidates left. The one with the most votes wins.

The final numbers in the mayoral primary likely won't be known for at least two weeks because the rounds can't be run until all the mailed ballots are in.

Adams appeared confident of victory Tuesday night, telling cheering supporters, “New York City said our first choice is Eric Adams.”

But Wiley and Garcia said they will wait for every ranked vote to be counted.

“We’ve known all along that we have strong support in the top rankings, so we’re excited about the possibility here," Wiley said at a Brooklyn subway station on Wednesday. "We know we can win. The voters will decide. We will wait patiently.”

Garcia told supporters at her election night party Tuesday, "It’s going to come down to opening up those ballots and making sure every single New Yorker’s voice is heard.”

The three emerged from a crowded field that also included 2020 presidential candidate Andrew Yang, who finished fourth in first-place votes of in-person voters and conceded about two hours after polls closed.

Either Adams or Wiley would be New York City's second Black mayor, and either Wiley or Garcia would be the city's first woman mayor.

Stark differences defined the three.

Adams, 60, a moderate who was a registered Republican in the late 1990s, was the co-founder of a leadership group for Black police. He promised to crack down on crime and police misconduct both.

"If Black lives really matter, it can’t only be against police abuse,” he said Tuesday. “It has to be about the violence tearing apart our communities."

The 57-year-old Wiley, a civil rights lawyer who formerly headed the city's Civilian Complaint Review Board, promised to cut $1 billion from the police budget and reallocate it to other city departments. Wiley framed herself as the candidate with "the courage to confront the bureaucracy, developers, and the NYPD."

Garcia, 51, a former sanitation commissioner who has also held leadership posts in several other city departments, campaigned as a pragmatist who already knew how to run the city. “In case of emergency, break glass,” a Garcia TV ad urged.

Many people who voted in Tuesday's primary did not rank all five candidates.

With nearly 800,000 votes counted, more than 100,000 didn’t bother to rank a second candidate. Slightly more than half didn’t rank the maximum five candidates.

Associated Press writer Stephen Ohlemacher in Washington contributed to this report.