Kathryn Garcia, a former sanitation chief, moved up from third place to a close second place, while Maya Wiley, a former MSNBC analyst and civil rights lawyer, fell from second to third.
The changing landscape, which included a sudden and unexpected increase in the number of votes counted, comes as the city is using ranked-choice voting for the first time.
Voters were allowed rank up to five candidates in order of preference, and Tuesday's tally reflected the first accounting of those secondary choices, though it excluded mail-in ballots.
Adams alleged unspecified "irregularities" after his lead shrank. He held a considerable lead on Election Day a week ago, based on the initial count of first-choice ballots.
Adams expressed confidence he would retain his lead but questioned why the vote total increased by more than 100,000 from the previous count.
"We have asked the Board of Elections to explain such a massive increase and other irregularities before we comment on the Ranked Choice Voting projection," Adams said in a statement.
The board said it was investigating.
"We are aware there is a discrepancy in the unofficial RCV round by round elimination report. We are working with our RCV technical staff to identify where the discrepancy occurred. We ask the public, elected officials and candidates to have patience," the board said on Twitter.
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. read more
After 11 rounds of elimination, Adams was ahead of Garcia 51% to 49%, with a margin of just under 16,000 votes among more than 700,000 total ballots.
Wiley was the final candidate eliminated; in the penultimate round, she trailed Garcia by fewer than 4,000 votes.
Tuesday's count, however, did not include any of the approximately 125,000 absentee ballots that have been received, which could easily alter the final results.
Garcia's campaign has said it expects to benefit from absentee ballots, which were turned in at high rates in neighborhoods where she did better than Adams and Wiley. In a statement, Garcia said she was "confident about a path to victory."
In a statement, Wiley called for every vote to be counted and urged all New Yorkers to support the results.
Elections officials plan to rerun the ranked-choice voting tabulation next week, this time with at least some absentee ballots included. Final results are not expected until mid-July.
Last week, Adams had 32% of first-choice ballots, based on the incomplete results released on Election Day. Wiley was at 22%, and Garcia stood in third at 19%. read more
Andrew Yang, the former presidential candidate, was in a distant fourth place and conceded on election night.
The winner of the Democratic primary will be a heavy favorite in November's general election against Republican nominee Curtis Sliwa, the founder of the Guardian Angels civilian patrol group. Democrats outnumber Republicans in the city six to one.
Public safety dominated the campaign, providing an early look at how Democrats nationally might approach the issue of policing ahead of next year's congressional midterm elections.
While many of his rivals called for police reform or funding cuts after national protests against racism in 2020, Adams, a former police officer, vowed to reinforce police departments. Reporting by Joseph Ax; Additional reporting by Daniel Trotta; Editing by Colleen Jenkins, Sonya Hepinstall and Lisa Shumaker