Bernie Sanders has won a commanding victory over Democratic rival Hillary Clinton in the New Hampshire US presidential primary, with Donald Trump also scoring a big win over his Republican rivals.

Their victories mark a triumph of two candidates who have seized on Americans' anger at the Washington political establishment.

Both outcomes would have been nearly unthinkable not long ago. Mr Sanders, a self-described democratic socialist, beat a former US secretary of state and first lady once seen as the all-but-certain Democratic nominee.

While Mrs Clinton remains the favourite in the national race for the Democratic nomination, the win by Vermont senator Mr Sanders could be a springboard to a competitive, drawn-out primary campaign.

For Republican Mr Trump, the brash billionaire property magnate and television personality who has never held public office, the win was an important rebound after his loss to Texas senator Ted Cruz in last week's Iowa caucuses, the first nominating contest.

Mr Trump has led national polls for months and the New Hampshire victory reinforces his position as front-runner, proving he can win votes, and giving credibility to his upstart populist candidacy.

"Wow, wow, wow, wow," he declared, savouring his victory at a campaign rally before promising swift action as president on the economy, trade, health care, drug abuse and more.

"We are going to do something so good and so fast and so strong and the world is going to respect us again. Believe me."

For some Republican leaders, back-to-back victories by Mr Trump and Mr Cruz, an uncompromising conservative, add urgency to the need to coalesce around a more mainstream candidate to challenge them through the primaries. But the New Hampshire vote did little to clarify who that candidate might be.

Ohio governor John Kasich finished second after devoting almost all of his campaign resources to New Hampshire. Competing for third were Mr Cruz, former Florida governor Jeb Bush and Florida senator Marco Rubio. All looked for a strong showing that would produce an influx of new donor money and attention as the election moves on to the February 20 South Carolina primary.

New Jersey governor Chris Christie, who had dedicated a significant amount of time to New Hampshire, lagged behind in the vote count, casting doubt on the future of his campaign. He told supporters that instead of going to South Carolina, he would head home to "take a deep breath" and take stock of his struggling presidential bid.

The day was also a blow for Mr Rubio, who had appeared to be breaking away from the second-tier Republican pack after a stronger-than-expected third-place showing in Iowa. But he stumbled in a debate on Saturday under intense pressure from Mr Christie who cast the young senator as too inexperienced and too reliant on memorised talking points to become president.

At stake in New Hampshire were less than 1% of the delegates who, at party national conventions in July, will choose nominees to succeed President Barack Obama. But a strong showing in New Hampshire can give a candidate momentum ahead of state contests in coming weeks, including the March 1 "Super Tuesday", when 11 states vote.

Among Democrats, Mr Sanders, who narrowly lost in Iowa, had maintained a sizeable advantage over Mrs Clinton in New Hampshire for weeks. He appeals to liberal Democrats who believe Mr Obama has not done enough to address the nation's disparity in wealth.

Mr Sanders told a raucous victory party that his win sent a message "that the government of our great country belongs to all of the people and not just a handful of wealthy campaign contributors" and their political committees.

Mrs Clinton echoed Mr Sanders' calls for tackling income inequality, but cast herself as more prepared to make good on her policy pledges. "People have every right to be angry. But they're also hungry, they're hungry for solutions," she said.

But Mrs Clinton has been on the defensive, about her ties to Wall Street - including hundreds of thousands of dollars in speaking fees from financial firms - and her use of a personal email account for official business while secretary of state, which has raised questions about whether she mishandled government secrets and about her overall trustworthiness.

Her campaign argues she will perform better as the race heads to more racially diverse states, including Nevada and South Carolina. Both New Hampshire and Iowa are overwhelmingly white states that are far less diverse than the nation - and particularly the Democratic electorate - as a whole.

While Mr Sanders' victory means he is assured of a majority of the state's pledged delegates, Mrs Clinton remains ahead in the overall delegate count due to support from super-delegates - party officials who can support the candidate of their choice at the convention.

Overall, Mrs Clinton has amassed at least 392 delegates and Mr Sanders at least 42. The magic number to clinch the nomination is 2,382.

Mr Trump will take the lead in the race for delegates for the Republican National Convention. But it will not be much of a lead.

There are only 23 delegates at stake in New Hampshire's Republican primary and they are awarded proportionally, based on the state-wide vote. Mr Trump will win at least nine. A candidate needs 1,237 delegates to win the nomination.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.