Mr. Adams and Ms. Garcia both ran as relative moderates on policy issues, including policing, education and their postures toward the business and real estate communities.
Mr. Adams especially put issues of public safety at the center of his campaign, pushing for urgent action to combat a rise in gun violence and troubling incidents of subway crimes as well as bias attacks, especially against Asian Americans and Jews. While crime rates are nowhere near those of more violent earlier eras, policing still became the most divisive subject in the mayoral race.
Mr. Adams took a more sweeping view of the Police Department’s role in ensuring public safety than a number of rivals did.
But some older voters had first heard about Mr. Adams when he was a younger member of the police force, pushing to rein in police misconduct.
That background helped him emerge as a candidate with perceived credibility on issues of both combating crime and curbing police violence. And some Democrats, aware that national Republicans are eager to caricature their party as insufficiently concerned about crime, have taken note of Mr. Adams’s messaging — even if his career and life story are, in practice, difficult for other candidates to automatically replicate.
“What Eric Adams has said quite well is that we need to listen to communities that are concerned about public safety, even as we fight for critical reforms in policing and racial justice more broadly in our society,” said Representative Sean Patrick Maloney, a New York Democrat and the chairman of the Democratic House campaign arm, who endorsed Mr. Adams the day before the primary.
While Mr. Adams was named the winner on Tuesday night, he faces significant challenges in unifying the city around his candidacy. He has faced scrutiny over transparency issues concerning his tax and real estate disclosures; his fund-raising practices and even questions of residency, issues that may intensify under the glare of the nominee’s spotlight, and certainly as mayor, should he win as expected in November.
Michael Gold, Dana Rubinstein and Emma G. Fitzsimmons contributed reporting.