Bernie Sanders won New Hampshire’s first-in-the-nation Democratic primary on Tuesday, narrowly topping nearest competitor Pete Buttigieg as voters went for the self-avowed democratic socialist over the former mayor of South Bend, Ind.

Networks called the race for Sanders with more than 80% of the results in, about a week after the Feb. 3 Iowa caucuses resulted in a virtual tie between the two contenders.

“This victory here is the beginning of the end for Donald Trump,” Sanders said.

Minnesota Sen. Amy Klobuchar was in a solid third place following a strong debate performance last week, but the results were worse for Sen. Elizabeth Warren of Massachusetts and former Vice President Joe Biden.

Biden, who placed a disappointing fifth, left New Hampshire on Tuesday evening to travel to South Carolina, a more diverse state where his campaign expects he will perform better. Biden had downplayed his chances in New Hampshire and said Tuesday night that most African-American and Latino voters had not voted yet.

“It ain’t over man, we are just getting started,” he said.

Sanders’ performance in New Hampshire gives him momentum, with Nevada next on the calendar. Voters will caucus there on Feb. 22. South Carolina holds its primary on Feb. 29.

Wall Street analysts have begun to game out a Sanders nomination even with the great majority of primaries still to come. Raymond James analysts said Sanders winning the party’s nod would increase the likelihood of a victory by President Donald Trump in November, and potentially boost the chances for an all-Republican government. That’s “positive for stocks DJIA, -0.87% , ” they wrote.

See:Stocks face a ‘win-win-win’ as Sanders leads in polls, analysts say.

The 78-year-old Sanders’ agenda includes “Medicare for All,” reducing income inequality and canceling student debt. In Iowa and again in New Hampshire, he found himself fighting hard for votes against Buttigieg, who is seen as the more pragmatic — if less-experienced — candidate. The 38-year-old diverges from Sanders by proposing, for example, public health care to those who want it. Others would be free to keep private insurance.

Buttigieg’s prospects are lower in South Carolina and Nevada, but he has said his early success will improve his chances with voters of color. “We are here to stay,” he told supporters.

Klobuchar, like Buttigieg and Biden, has campaigned as a moderate, and projected fresh optimism in a speech to supporters.

“Hello America,” she said at a rally Tuesday as the votes were still being counted. “I’m Amy Klobuchar and I will beat Donald Trump.”

Biden faces a critical road ahead. Initially topping the Democratic field in polls, he has fallen behind Sanders in an average of national surveys. Former New York Mayor Mike Bloomberg, who didn’t compete in New Hampshire and is instead focusing on the Super Tuesday states, is in third place in national polls, according to RealClearPolitics.

Now read:Not-on-the-ballot Bloomberg carries tiny Dixville Notch as New Hampshire primaries get underway.

Warren addressed supporters in Manchester, saying Sanders and Buttigieg had “strong nights,” and congratulated Klobuchar. But she decried what she said was “harsh tactics,” such as an increase in negative advertisements.

“We will need a nominee that the broadest coalition of our party feels they can get behind,” she said.

Trump held a rally Monday night in Manchester, urging independents who support him to back “the weakest” Democratic candidate in the primary, the Associated Press wrote. He boasted about the strong economy and launched an assault on Democrats who tried to remove him from office, AP reported.

The Democrats’ field shrank by two candidates on Tuesday night, with Andrew Yang and Michael Bennet ending their bids for the nomination.

For Democrats, New Hampshire offers 24 delegates out of the 1,991 needed to win the party’s presidential nomination. Trump won New Hampshire’s Republican primary, easily defeating former Massachusetts Gov. Bill Weld.

Also see:‘Everyone is exhausted by this president’: Bill Weld on why he’s challenging Donald Trump.