MANCHESTER, New Hampshire — Four years after securing a crucial victory in this state during his first presidential campaign, Bernie Sanders won the New Hampshire primary again here on Tuesday night, marking a significant show of staying power for the senator and his political movement in a rapidly shifting Democratic primary.

Sanders, who spoke to supporters on Tuesday night at the Southern New Hampshire University field house, finished with a smaller margin of victory than his finish in 2016 against Hillary Clinton. Only a couple points and some 4,000 votes separated Sanders and Pete Buttigieg on Tuesday night, with Amy Klobuchar a little further behind.

"And let me say tonight, that this victory here is the beginning of the end for Donald Trump," Sanders told his crowd of supporters.

Throughout the night, the shape of a large Democratic field seemed to change shape in a matter of hours: One candidate with a loyal following, Andrew Yang, dropped out. Two others who have previously enjoyed the position of strong frontrunner, Elizabeth Warren and Joe Biden, finished below 15%, leaving without collecting a single pledged delegate from the state.

Sanders, a longtime independent from the neighboring state of Vermont, has kept a steady hold on his support. With his win here and his lead in the raw votes of the nightmarish Iowa caucus, the 78-year-old Vermont senator is poised to leave the first two states in the primary calendar as the dominant candidate just months after a heart attack threatened to derail his candidacy.

In 2016, he won here by 22 points, setting up a protracted fight for the nomination that hinged in large part on Clinton’s strength with voters of color.

This time, Sanders is heading into the next two contests — Nevada and South Carolina — as a more popular candidate among black and Latinx voters. Nationally, he has risen in polls, has picked up endorsements from some of the biggest names in Democratic politics, and appears to have a viable path to the nomination — a reality that has already sparked concern inside the party.

Buttigieg, the former South Bend mayor who finished at the top of Iowa with Sanders, looks to be finishing in second, close with a surprisingly strong Klobuchar. In Iowa, the state that hosts the first presidential nominating contest every four years, Buttigieg appears to lead on the state delegate equivalents, the standard that in the past has determined the caucus winner, while Sanders won the raw vote count in both rounds of caucus voting, including after the so-called realignment process, when voters backing candidates who don’t reach threshold of 15% support at a caucus may choose to realign with another candidate.

On the campaign trail in New Hampshire, Sanders made a rare mention of Buttigieg by name, telling voters that billionaires “by the dozen are contributing to Pete Buttigieg’s campaign.”

“Now, I like Pete. He’s a smart guy. He’s a nice guy,” he said during a stop in Dover, New Hampshire. “But if we are serious about political change in America, that change is not going to be coming from somebody who gets a lot of money from the CEOs of the pharmaceutical industry.”

Buttigieg, until recently the mayor of a city of just some 100,000 people, wrote an essay praising Sanders as a high school student but is now running as his moderate opposition. The two share little in common as candidates: Sanders is 78. Buttigieg is 38. Sanders speaks of bringing massive change to Washington through a working-class movement. Buttigieg speaks of bold ideas without forcing people to “choose between a revolution and a status quo.”

With Warren, Biden, and Klobuchar in the race, and loyalties split across the Democratic field, there has been only talk but no evidence of an organized or well-funded "stop Sanders" movement. The closest thing may be the candidacy of former New York City mayor Michael Bloomberg, who is funneling tens of millions of dollars from his own fortune into a campaign machine ready to compete in the Democratic primaries that will be held in March.

In this campaign and in his last, the idea of establishment blowback has been fuel for Sanders supporters.

“We are taking on the Democratic establishment, and all across the country, let me tell you that the big money interests are getting very nervous,” Sanders said at a rally in Ames, Iowa, days before the state’s caucuses. “They’re looking at recent polls in New Hampshire and in Iowa and they’re saying ‘Oh my god, Sanders can win.’”

The night before the primary here, an arena full of 7,000 Sanders supporters in Durham, New Hampshire, came out to see the candidate, Rep. Alexandria Ocasio-Cortez, and the Strokes, with the same roaring energy and intensity that has propelled his movement and alienated his critics.

At one point, when the actor and former New York gubernatorial candidate Cynthia Nixon spoke of her support for Hillary Clinton four years earlier, the crowd unleashed a wave of boos.

Nixon shook her head and raised her hand. "Oh no. Oh no. We're not gonna do that here," she said as the boos transitioned to sustained applause.

"I supported her because I wanted a woman president. I thought she was incredibly qualified. And I thought she was unbeatable,” she said. “But it's four years later.”

Later in the night during the Strokes' show, campus police manning the Whittemore Center Arena had to storm the stage to calm the crowd and help remove bike racks from the mosh pit.

At his victory party on Tuesday night, 1,200 people crowed into the SNHU field house to wait hours for an official result. On a large projector suspended over the gym, CNN’s live coverage played on mute. Around 11 p.m., with the results still tight, footage from Buttigieg’s election night speech flashed silently on the screen. The former mayor was congratulating their candidate — “I admired Sen. Sanders when I was a high school student. I respect him greatly to this day,” Buttigieg said — but Bernie supporters let out a round of boos as soon as they saw his image.

“BERNIE BEATS TRUMP, BERNIE BEATS TRUMP,” they shouted.

The crowd fell silent again. Sanders’s campaign playlist rolled on in the background.

Then a new chant started up, echoing some of the candidate’s own rhetoric about Buttigieg here in New Hampshire.

“WALL STREET PETE,” they said. “WALL STREET PETE.”

By the time he took the stage with his family, the decibel level in the room was so high it was difficult to hear Sanders finish his sentences. When he expressed his “appreciation and respect for all the Democratic candidates we ran against” — congratulating Buttigieg, Klobuchar, Warren, and Biden by name — most of the crowd cheered along.

It was the latest scene from what Sanders has premised as a massive “gamble” here in New Hampshire and in states across the country: turning nonvoters into voters with a promise to expand the Democratic electorate and inspire historic levels of turnout on Election Day.

At town halls and through his large digital platform, he has emphasized the stories of hundreds of individuals who are struggling with low wages, medical debt, student loans, and failing infrastructure, and the everyday anxiety of life in a country that Sanders says is riddled with systemic injustice.

While the strategy appears to have set his campaign up for a strong performance in the early primary states, the turnout in Iowa fell short of the record-breaking figures Sanders wanted.

In Iowa, turnout was nearly 173,000 people, just above the levels set in 2016, when about 170,000 participated in the contest between Sanders and Hillary Clinton. That level would be well below the almost 240,000 Iowa voters that set a record in 2008 during Barack Obama’s first presidential campaign.

“Not as high, frankly, as I would have liked to have seen,’’ Sanders told reporters last week before leaving Iowa for New Hampshire.

Turnout in New Hampshire, with votes still being counted, is beyond the levels of 2016 and could still surpass 2008's.