US Senator Bernie Sanders declared victory in New Hampshire’s Democratic presidential primary on Tuesday, building momentum as the competition heads west to Nevada. The progressive senator beat rival Pete Buttigieg, former mayor of the Indiana town of South Bend, solidifying his front-runner status in the race for the Democratic presidential nomination. The Vermont senator, 78, secured 25.8 per cent of the vote with 77 per cent counted, compared with 24.2 per cent for Mr Buttigieg. But despite Mr Buttigieg coming second in New Hampshire, he is so far still leading in the delegate count. He has 23 delegates compared to 21 for Bernie Sanders, CNN reported. To win the nomination, a candidate has to reach the magic number of 1,991 delegates before the party convention in July. If neither candidate does, the Democrats could be heading to a brokered convention. Mr Sanders’ supporters jeered Mr Buttigieg, chanting "Wall Street Pete" as he spoke to CNN. Mr Sanders rolled to victory in the second contest in the race to pick a challenger to Republican President Donald Trump. He fended off attacks from rivals who warned his far-left views would lead the party to defeat in the November 3 election. Minnesota’s Senator Amy Klobuchar looked set to finish third, with heavyweights Senator Elizabeth Warren and former Vice President Joe Biden falling behind. The results pile pressure on Mr Biden to end his campaign as early indications from Iowa and now New Hampshire point to weakening support among Democratic voters. He came a distant fifth with only 8.6 per cent, behind Ms Warren at 9.5. In a surprise move, Mr Biden left the Granite State early on Tuesday before polls closed, heading to South Carolina, which could bring life to his bid if he wins there on February 29. His decline has made way for former mayor of New York Michael Bloomberg to compete for the moderate vote in Super Tuesday states on March 3. Mr Bloomberg, a late entrant to the race who is skipping the first four contests, did not have his name on the ballot for the New Hampshire primary. But that did not stop voters in the mountain hamlet of Dixville Notch from picking the billionaire as a write-in candidate when they voted just after midnight on Tuesday. He won three of the five ballots cast. Andrew Yang, 45, an entrepreneur and the only Asian-American candidate in the race, dropped out on Tuesday after disappointing projections. “The math just didn’t work out,” said Zach Graumann, Mr Yang’s campaign manager. Colorado Senator Michael Bennet also dropped out from the race on Tuesday. Massachusetts’ Deval Patrick is expected to suspend his campaign before announcing his withdrawal. New Hampshire is the second contest of the US presidential party nominating cycle. While few votes are on offer, it gives candidates a chance to build momentum for their campaigns. The Democrats are seeking clarity in New Hampshire after the Iowa vote descended into chaos last week, with the front-runners emerging neck and neck after a days-long delay in the count. Most polling stations closed by 7pm local time and a handful of votes have already been counted from small towns that voted after midnight on Monday, although the full primary results are not expected until at least 9.30pm local time. The state of Nevada will vote next, on February 22.