New York City's first attempt at ranked-choice voting descended into confusion on Tuesday, after the elections board abruptly removed updated vote totals from its website hours after posting them due to what it called a "discrepancy" in the numbers.

The primary election to choose the next leader of America's largest city was held a week ago, when preliminary results showed Eric Adams, the Brooklyn borough president, with a significant but not insurmountable 10-point lead in the vote.

That lead appeared to shrink to two points on Tuesday when voters' second, third, fourth and fifth choices were factored in under a ranked-voting system being used for the first time in a mayoral contest. Regardless of Tuesday's developments, final results were not expected until mid-July.

But Tuesday's tabulation showed an additional 140,000 ballots since Election Day, prompting Adams to complain of irregularities. The city Board of Elections issued a vague statement acknowledging a "discrepancy" and said its staff was working to determine where the problem had occurred.

By evening, the vote totals had been taken down, replaced by a note saying the results would be available on Wednesday. The board eventually put out a new statement at around 10:30 p.m., saying it had inadvertently failed to remove sample ballots it had used to test its software.

The results had appeared to show the race narrowing, with Kathryn Garcia, the city's former sanitation chief who ran as a technocrat, moving up to a close second and Maya Wiley, a former MSNBC analyst and civil rights lawyer who emerged as the liberal standard-bearer, falling from second to third.

The New York vote is widely seen as an important test for proponents of ranked-choice voting, which allows voters to rank multiple candidates in order of preference.

Most U.S. elections are "winner take all" but some major cities have gone to ranked-choice voting, which supporters argue is more democratic. Countries such as Australia, New Zealand and Ireland use a form of the system.

Whoever emerges as the winner of the Democratic primary will be a heavy favorite in November's general election in a city where Democrats outnumber Republicans six to one. The next mayor will confront an arduous recovery from the coronavirus pandemic amid a spike in violent crime, as well as long-term challenges such as economic inequality and a lack of affordable housing.

The ranked-choice system operates as a series of instant runoffs. The candidate in last place is eliminated, and his or her votes are redistributed to voters' second choice. The process repeats until there are only two candidates remaining, and the one with a majority is declared the winner. 

Last week, Adams had 32% of first-choice ballots, based on the incomplete results released on Election Day. Wiley was at 22%, and Garcia third on 19%. 

Andrew Yang, the former presidential candidate, was in a distant fourth place and conceded on election night.

Any results released this week will not include the approximately 125,000 absentee ballots that have been received - potentially enough to alter the final results.

In a statement, Adams called Tuesday's error "unfortunate" and said he was looking forward to an accurate update.

Garcia called the mistake "deeply troubling, while Wiley blamed the board for "mismanagement." Both called on election officials to count every vote to ensure voters' confidence in the outcome.

The Democratic winner will face Republican nominee Curtis Sliwa, the founder of the Guardian Angels civilian patrol group, in the November general election.

Public safety dominated the campaign thanks to a surge in shootings, providing an early look at how Democrats nationally might approach the issue of policing ahead of next year's congressional midterm elections.

While some of his more liberal rivals called for cutting the police budget after national protests against racism in 2020, Adams, a former police captain, vowed to increase patrols and beef up the police department.

(Reporting by Joseph Ax; Additional reporting by Daniel Trotta; Editing by Colleen Jenkins, Sonya Hepinstall and Lisa Shumaker) ((joseph.ax@thomsonreuters.com; 1-646-223-6594 1-917-848-0813; Reuters Messaging: joseph.ax.thomsonreuters.com@reuters.net))