Eric Leroy Adams, a former New York City police captain whose attention-grabbing persona and eager deal with racial justice fueled a decades-long career in public life, was elected on Tuesday because the one hundred and tenth mayor of New York and the second Black mayor within the metropolis’s historical past.

Mr. Adams, who will take workplace on Jan. 1, faces a staggering set of challenges because the nation’s largest metropolis grapples with the enduring penalties of the pandemic, together with a precarious and unequal financial restoration and persevering with issues about crime and the standard of metropolis life, all formed by stark political divisions over how New York ought to transfer ahead.

His victory alerts the beginning of a extra center-left Democratic leadership that, he has promised, will replicate the wants of the working- and middle-class voters of color who delivered him the celebration’s nomination and had been very important to his common election coalition.

The leads to New York unfolded as Democrats throughout the nation monitored the rising outcomes in two different carefully watched races with concern: the contests for governor in Virginia and New Jersey, two states that President Biden gained comfortably final yr.

By the tip of the night time, Glenn Youngkin, the Republican, had taken the lead in Virginia, and the Democrat, the previous Gov. Terry McAuliffe, was operating effectively behind Mr. Biden’s 2020 margin in suburban and exurban communities throughout the state.

Mr. Youngkin ran a vigorous marketing campaign within the Democratic-leaning state, in search of to capitalize on Mr. Biden’s weak ballot numbers and parents’ anger with local school boards. Mr. McAuliffe, who was governor from 2014 to 2018, sought at each flip to tie Mr. Youngkin to former President Donald J. Trump in hopes of mobilizing Democrats and unbiased voters, however he mentioned little about what he would do with one other time period.

In New Jersey, the Democratic incumbent, Philip D. Murphy, was in an unexpectedly tight race with the Republican challenger, Jack Ciattarelli. The 2 races for governor had been seen by many celebration strategists as probably ominous indicators for subsequent yr’s midterm elections.

In New York Metropolis, at the same time as Republicans appeared poised for the potential for slight features within the Metropolis Council, Democrats gained the marquee contests simply. It appeared doubtless that lots of the officers Mr. Adams should work with carefully — distinguished incoming Metropolis Council members, the general public advocate and different Democrats who gained on Tuesday — can be considerably to Mr. Adams’s left.

Mr. Adams, whose win over his Republican opponent, Curtis Sliwa, gave the impression to be resounding, will start the job with important political leverage.

He assembled a broad coalition, and was embraced by each Mayor Bill de Blasio, who sought to chart extra of a left-wing course for New York, and by centrist leaders like Michael R. Bloomberg, Mr. de Blasio’s predecessor. Mr. Adams was the favored candidate of labor unions and wealthy donors. And he and Gov. Kathy Hochul, who confirmed up at his victory celebration, have made clear that they intend to have a extra productive relationship than Mr. de Blasio had with Andrew M. Cuomo when he was governor.

Mr. Adams was buoyant in taking the stage on the New York Marriott in Brooklyn an hour after polls closed, getting into to “The Champ Is Right here,” a Jadakiss tune he used throughout his marketing campaign, earlier than delivering his acceptance speech.

“We’re so divided proper now and we’re lacking the fantastic thing about our range,” Mr. Adams mentioned, remarks that echoed the “gorgeous mosaic” that David N. Dinkins, New York’s first Black mayor, famously mentioned. “Right now we take off the intramural jersey and we placed on one jersey: Crew New York.”

The Related Press referred to as Mr. Adams’s victory 10 minutes after polls closed, reflecting the overwhelming edge Democrats have in New York Metropolis even amid indicators of low turnout. Minutes later, the A.P. declared Alvin Bragg, a Democrat, the winner of the Manhattan district lawyer’s race.

Mr. Sliwa conceded Tuesday night time, telling supporters that he was “pledging my assist to the brand new mayor Eric Adams.” However Mr. Sliwa, a longtime tabloid fixture, additionally insisted, “You should have Curtis Sliwa to kick round.”

Observers of New York politics had been awaiting leads to two Lengthy Island races for district attorney that examined suburban attitudes concerning the state’s current felony justice reforms.

And in Buffalo, a fiercely contested matchup between India B. Walton, a democratic socialist and the Democratic nominee, and the incumbent mayor, Byron W. Brown, was getting nationwide consideration. A victor was not anticipated to be selected election night time, partly as a result of Mr. Brown waged a write-in campaign. However about 60 p.c of the ballots had been marked for write-in, and Mr. Brown declared victory.

In New York Metropolis, the difficulties that Mr. Adams, 61, will encounter had been obvious at the same time as he celebrated his victory. “We’re preventing Covid, crime and financial devastation suddenly,” he mentioned Tuesday night time.

Certainly, in one of many world’s monetary capitals, employees are barely trickling again to their Midtown workplaces. The tourism industry is struggling. Lots of the metropolis’s beloved restaurants and other businesses have closed for good. And at the same time as Wall Avenue earnings soar, the town’s unemployment charge stood at 9.8 p.c in September, with job development lagging behind the tempo that some economists had predicted final spring.

Mr. Adams may also inherit a finances hole of about $5 billion that can require instant motion, mentioned Andrew S. Rein, president of the nonpartisan Residents Funds Fee. There can be contracts to barter with metropolis employees and, finally, the federal support that helped pay for some metropolis priorities will dwindle.

“Each choice has long-run implications,” Mr. Rein mentioned. “In case you begin sooner, you may handle it. If you’re in an emergency scenario, it’s laborious to make good selections that aren’t painful.”

Mr. Adams has harassed that he plans to deal with rooting out inefficiency — and he has a number of proposals he desires to introduce — however the scope of the fiscal challenges will doubtless require making troublesome selections.

He has made it clear that large enterprise has a role to play in shepherding the town’s restoration, and there are indications that he might have a far hotter relationship with enterprise leaders than Mr. de Blasio, who was elected on a fiery populist platform.

“He’s restored confidence that the town is a spot the place enterprise can thrive,” mentioned Kathryn S. Wylde, who leads the business-aligned Partnership for New York Metropolis. “He’s demonstrated that he has the braveness to, principally, be politically incorrect with regards to coping with the demonization of wealth and enterprise.”

There isn’t any problem the following mayor has mentioned greater than public security.

“We’re not going to only speak about security,” Mr. Adams declared. “We’re going to have security in our metropolis.”

Mr. Adams grew up poor in Queens and Brooklyn and says he was as soon as a sufferer of police brutality. He spent his early years in public life as a transit police officer and, later, a captain who pushed, sometimes provocatively, for modifications from throughout the system. That have cemented his credibility with many older voters of colour, a few of whom distrust the police whereas additionally worrying about crime.

In the course of the major, amid a spike in gun violence and jarring assaults on the subway that fueled public fears about crime, Mr. Adams emerged as certainly one of his celebration’s most unflinching advocates for the police sustaining a strong function in preserving public security. He typically clashed with those that sought to cut back legislation enforcement’s energy in favor of selling better investments in psychological well being and different social companies.

Mr. Adams, who has mentioned he has no tolerance for abusive officers, helps the restoration of a reformed plainclothes anti-crime unit. He opposes the abuse of stop-and-frisk policing techniques however sees a job for the follow in some circumstances. And he has referred to as for a extra seen police presence on the subways.

The general public security problem remained on the minds of some voters on Tuesday.

“Hopefully, since he was in N.Y.P.D., he may get all the pieces amicable once more with the town and the N.Y.P.D., as a result of it’s been very harmful out right here,” mentioned Esmirna Flores, 38, as she ready to vote for Mr. Adams within the Bronx.

But different voters mentioned Mr. Adams’s emphasis on policing stoked misgivings. And he will definitely face resistance on the topic from some incoming Metropolis Council members.

Tiffany Cabán, a distinguished incoming member who was endorsed by the Democratic Socialists of America, mentioned that on many points she was “able to be collaborative.”

“Then you definitely’ll see that there are occasions the place there can be pressure,” she mentioned. After emphasizing potential areas of widespread floor, she talked about the prospect of Mr. Adams’s extra assertive policing insurance policies and added: “We’re going to be prepared for a battle on these issues.”

There can also be battles over schooling. Mr. de Blasio just lately vowed to start phasing out the gifted program within the metropolis’s colleges, which places youngsters on totally different educational tracks and has been criticized for exacerbating segregation. The difficulty conjures up robust passions amongst dad and mom.

Mr. Adams has indicated that he desires to keep and expand access to the program, whereas additionally creating extra alternatives for college students who’ve studying disabilities, as he did. He helps common screening for dyslexia.

Extra instantly, he faces the duty of filling out his authorities.

All through the marketing campaign, Mr. Adams confronted important questions from Mr. Sliwa — and the information media — over issues of transparency, residency and his personal financial dealings. The individuals he hires for his administration will play a major function in setting the tone on problems with ethics and competence.

Requested what he was searching for within the highly effective place of first deputy mayor, Mr. Adams mentioned on Tuesday that his “No. 1 standards” was “emotional intelligence.”

“In case you don’t empathize with that individual, you’ll by no means give them the companies that they want,” he mentioned.

For some voters, it was Mr. Adams’s personal life expertise that compelled them to end up.

Mark Godfrey, a 65-year-old Black man, mentioned Mr. Adams’s rise confirmed that “there are refined modifications which can be occurring within the U.S.” associated to racial fairness and illustration.

“He’s been on either side,” Mr. Godfrey mentioned of Mr. Adams’s experiences with legislation enforcement. “He’s been a survivor, and he’s been a part of the change.”

Reporting was contributed by Alexander Burns, Nicholas Fandos, Nicole Hong, Jonathan Martin, Jeffery C. Mays, Julianne McShane and James Thomas.