Bernie Sanders is projected to narrowly win the New Hampshire Democratic primary contest, a race that also culled the crowded field by two.
The left-wing firebrand won a tight victory over centrist former mayor Pete Buttigieg, who offered a different Democratic vision in the race to take on President Trump in November.
Mr Sanders declared the night “the beginning of the end” of Mr Trump.
The race moves next to the Nevada caucuses on 22 February.
Finishing behind the Vermont senator were two moderates – Mr Buttigieg and Minnesota senator Amy Klobuchar, who emerged as a surprise contender by taking third place.
Massachusetts senator Elizabeth Warren and former vice-president Joe Biden – two erstwhile frontrunners – finished in fourth and fifth places.
Technology entrepreneur Andrew Yang and Colorado senator Michael Bennet both dropped out of the race.
Some 280,000 Democratic voters cast ballots in the Granite State on Tuesday night, delivering 26% to Mr Sanders.
Polls ahead of the vote predicted that the senator would again do well in New Hampshire – as the long-time representative of a neighbouring state, he is well-known.
A RealClearPolitics average of polls in New Hampshire put support for Mr Sanders on 29%, seven points ahead of Mr Buttigieg, who won the previous contest, the Iowa caucuses.
The actual result will be much closer. With 88% of the vote counted, Mr Sanders, 78, leads Mr Buttigieg, 38-year-old the former mayor of South Bend, Indiana, by only 1.6%, or about 4,300 votes.
Mr Sanders hailed a “great victory” as he thanked supporters from a rally in Manchester, New Hampshire.
“This victory here is the beginning of the end for Donald Trump,” he said, and promised to build an “unprecedented multi-generational, multi-racial political movement” to defeat the Republican.
The result will give Mr Sanders at least eight of the 24 delegates who will represent New Hampshire at the July Democratic national convention, where the party crowns a nominee based on the delegates won.
Mr Buttigieg will get at least seven delegates. Thanking supporters, he warned against succumbing to “a polarised vision” of politics and pitched himself as the centrist to bring new voters into the party.
New Hampshire primary: Bernie Sanders narrowly beats Pete Buttigieg