MANCHESTER, N.H.—US Senator Bernie Sanders, the fiery progressive from Vermont, has won the New Hampshire Democratic primary, according to The Associated Press.
The AP called the race for Sanders at 11:42 p.m.
Sanders, speaking earlier to wildly cheering supporters, thanked New Hampshire for “a great victory tonight,” after TV networks declared him the winner over second-place finisher Pete Buttigieg, former mayor of South Bend, Ind.
With 84 percent of precincts reporting, Sanders had 26 percent of the vote, compared with 24 percent for Buttigieg. US Senator Amy Klobuchar, who had gained momentum in recent days, was running a strong third, with 20 percent.
Meanwhile, US Senator Elizabeth Warren and former vice president Joe Biden were languishing in fourth and fifth place, respectively.
Tuesday’s election added clarity to a primary season that got off to a rocky start in the chaotic Iowa caucuses. The candidates are vying for the chance to battle divisive Republican President Trump in the November election.
“This victory here is the beginning of the end for Donald Trump,” the 78-year-old Sanders said. “No matter who wins [the nomination] we’re going to unite together and defeat the most dangerous president in the modern history of our country.”
Buttigieg, speaking to his supporters, congratulated Sanders on his “strong showing tonight” but vowed to continue on the campaign trail.
Buttigieg, 38, said he “might get dismissed as a naive newcomer," but “a fresh outlook is what makes new beginnings possible. It is how we build a new majority.”
Klobuchar, who is vying with Buttigieg for moderate voters, told supporters, “Hello, America, I’m Amy Klobuchar, and I will beat Donald Trump.”
“Donald Trump’s worst nightmare is that the people in the middle, the people who have had enough of the namecalling and the mudslinging, have someone to vote for in November,” she said. “I cannot wait to build a movement and win with a movement of fired-up Democrats, independents, and moderate Republicans,” she said.
Klobuchar’s third-place finish was a surprising twist. She had finished fifth in Iowa, but in recent days she had begun drawing large and lively crowds and ticking up in polls.
An unbowed Warren, who was vying for progressive voters with Sanders, told supporters that Sanders and Buttigieg had “strong nights” and congratulated Klobuchar for “showing just how wrong the pundits can be when they count a woman out.”
“We might be headed for another one of those long primary fights that lasts for months,” she said. "This fight we’re in — the fight to save our democracy — is an uphill battle. But our campaign is built for the long haul. And we are just getting started.”
Long-shot candidate Andrew Yang, who appeared to be on course for a poor showing, announced minutes after the polls closed that he was suspending his campaign.
“I have been persuaded that the message of this campaign will not be strengthened by my staying in this campaign any longer,” Yang told supporters. “Endings are hard, New Hampshire, but this is not an ending. This is a beginning.”
Another candidate who had struggled to garner support, Colorado US Senator Michael Bennet, also announced he was dropping out of the race.
The Iowa caucuses earlier this month delivered a split decision: Buttigieg appeared to win the state delegate race, while Sanders locked down more of the popular vote. Both candidates have requested a partial recount there, after delays and glitches marred the process and overshadowed the first days of campaigning in New Hampshire.
Biden, a two-term vice president, admitted on the debate stage Friday that he didn’t believe he’d perform well in New Hampshire after a 4th-place “gut punch” in Iowa. He abruptly announced Tuesday that he was heading to South Carolina instead of attending his Manchester election night party.
In an upbeat speech to supporters in South Carolina, he emphasized that only two states, Iowa and New Hampshire, had spoken so far.
“Where I come from, that’s the opening bell, not the closing bell. The fight to end Donald Trump’s presidency is just beginning,” he said. “It ain’t over, man. We’re just getting started.”
He also said the vast majority of Black and Latino voters had not yet had a chance to vote. “You can’t be the Democratic nominee and you can’t win the general election as a Democrat, unless you have overwhelming support from black and brown voters.”
While Sanders, a politician from a neighboring state who won the New Hampshire primary in 2016, enjoyed a polling lead in New Hampshire before voters cast their ballots, the race was considered fluid and unpredictable. For one thing, New Hampshire’s large share of undeclared, or independent, voters often leads to unexpected results. About 43 percent of New Hampshire’s 1 million registered voters classify themselves as undeclared and can choose to vote in the Democratic or Republican primary.
Sanders will now head to the next contest in Nevada with greater momentum. Sanders told his fans across New Hampshire in recent days that he believed winning there would put him on a glide path to the nomination.
Meanwhile the billionaire former New York City mayor Michael Bloomberg, who’s skipped the first four states but has poured hundreds of millions of dollars into advertising, has risen to third place in national polls, raising the possibility that he and Sanders could face off for the nomination if Biden continues to slide.
Roughly three-quarters of New Hampshire Democratic primary voters said they were not just dissatisfied but also angry with the Trump administration, according to a wide-ranging Associated Press VoteCast survey. A wide majority said it was very important that Democrats nominate a candidate who can beat Trump in November, the AP reported Tuesday.
Trump’s administration has been plagued by scandals. He has been impeached by the Democratic-led House and acquitted by the Republican-led Senate for his actions in the Ukraine affair. Trump held a rally in Manchester on Monday night where he mocked the Democratic candidates and urged Republican-leaning independents in the state to vote for the “weakest” candidate in the Democratic primary.
Trump handily won the Republican primary against long-shot candidate William F. Weld, a former Massachusetts governor. He commented on the Democratic primary in several jeering tweets.
Material from Globe wire services was used in this report. Globe staff reporters Andrew Rosen, Jess Bidgood, Stephanie Ebbert, Laura Krantz, Christina Prignano and Jazmine Ulloa contributed to this report.