Billionaire businessman Donald Trump has won New Hampshire's Republican primary, and Democratic Senator Bernie Sanders has beaten Hillary Clinton, US TV networks say.
Trump's win solidifies his front-runner status in the race to be the party's White House nominee for the November 8 election.
The reality television star's untraditional campaign has been marked by calls to deport illegal immigrants and temporarily ban Muslims from entering the United States.
Sanders, who describes himself as a democratic socialist, has called for eradicating income inequality, breaking up the big banks and providing free college tuition.
He had 58 percent of the vote based on about 15 percent of the vote, ahead of former Secretary of State Clinton, the perceived front-runner nationally, who had 40 percent, CNN said.
"You can be certain that our victory tonight will prompt a desperate response from the nation's financial elite and the political establishment who want to stop our campaign to transform America," Sanders said in an email to supporters.
In a statement Clinton's campaign acknowledged it had lost in New Hampshire, campaign manager Robby Mook said in a memo they had "split" the first two nominating contests - Clinton won Iowa last week - and said the Democratic nomination would "very likely" be decided in March.
The Clinton campaign said the support of black and Hispanic voters would be key to victory. The next primary races are in Nevada and South Carolina later this month.
"It will be very difficult, if not impossible, for a Democrat to win the nomination without strong levels of support among African-American and Hispanic voters," Mook wrote in a memo titled "March Matters."
"The nomination will very likely be won in March, not February, and we believe that Hillary Clinton is well positioned to build a strong - potentially insurmountable - delegate lead next month," he said.
Some 40 minutes after polls closed, Trump was in first place with 34 percent of the early vote.
Ohio Governor John Kasich, who staked the viability of his campaign on the New Hampshire outcome, was in second place with 16 percent, CNN said, based on an estimated 12 percent of returns.
A logjam of Republican candidates were in a dead heat for third place. Former Florida Governor Jeb Bush, the son and brother of former presidents, had 12 percent; US Senator Ted Cruz of Texas, who won the Iowa caucus last week, had 11 percent, and US Senator Marco Rubio of Florida had 10 percent.