Shaun Donovan, a former federal housing secretary; Raymond J. McGuire, a former Citi executive; and Scott M. Stringer, the city comptroller, who all benefited from heavy spending on television on their behalf, had hoped to show unexpected strength through the ranking process, but may be too far behind after the initial count.
Dianne Morales, a former nonprofit executive, once appeared poised to be a left-wing standard-bearer, but her standing suffered amid internal campaign turmoil, and she also trailed far behind.
No issue dominated the race more than public safety, as poll after poll showed combating crime was the most important issue to New York Democrats.
Sparse public polling suggested that Mr. Adams, a former police captain who challenged misconduct from within the system — part of a complex career — attained credibility on that subject in the eyes of some voters, which will have been a crucial factor if he wins, along with significant support from labor unions and deep ties to core Democratic constituencies, including working- and middle-class voters of color.
“I am going to be your mayor,” Mr. Adams said. “I want you to believe again. Let’s bring our city back.”
In her own speech Tuesday, Ms. Wiley made clear that the race was far from over.
“I don’t know what New Yorkers have chosen tonight, not any one of us do, because the votes are still being counted,” a hoarse but fiery Ms. Wiley said, nodding to the process of ranked-choice voting. “I will tell you what is true: Every single vote will count.”
Ms. Wiley had repeatedly challenged Mr. Adams from the left on policing matters, expressing skepticism about adding more officers to patrol the subways and calling for greater investments in the social safety net and less in the Police Department budget. With a pitch centered on how to “reimagine” a more equitable city, she emerged as a favorite of left-wing leaders and progressive voters. She also had the backing of the city’s largest union, and of Representative Hakeem Jeffries, the state’s highest-ranking House Democrat — important factors in her effort to build a multiracial coalition.