Bernie Sanders has defeated Hillary Clinton in the New Hampshire primary and Donald Trump also scored his first victory in 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, defeated Mrs Clinton, the 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 Mr Sanders could be a springboard into a competitive primary campaign.
His victory in New Hampshire means he is assured of a majority of the state’s pledged delegates.
With 24 at stake, Mr Sanders stands to gain at least 13. Mrs Clinton will receive at least seven.
For Republican Mr Trump, the brash billionaire property magnate and television personality who has never run for 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.
He has led national polls for months and the New Hampshire win reinforces his position as front-runner, proving his unorthodox, populist campaign can win primaries.
With Mr Trump’s victory, attention shifted to the runners-up in the race. Several candidates needed a strong finish to ensure the survival of their campaigns.
Marco Rubio, a 44-year-old Florida senator, hoped to build on a solid third-place finish in Iowa and brush off a rocky performance in last weekend’s Republican debate.
Former Florida gover Jeb Bush, Ohio governor John Kasich and New Jersey governor Chris Christie have spent most of their time in the state in recent weeks and needed to show voters, as well as crucial financial donors, that they were viable candidates.
If Mr Rubio and the governors finish in a pack, it is likely to frustrate Republican Party elites who are eager to coalesce around a single more mainstream candidate to challenge Mr Trump and Mr Cruz, whom they believe could be unelectable in the November general election.
At stake were less than 1% of the delegates who, at party national conventions in July, will choose nominees to succeed Barack Obama. But a strong showing in New Hampshire can result in a wave of media coverage, donations and give a candidate momentum ahead of races in coming weeks, including the March 1 “Super Tuesday”, when 11 states vote.
Nearly half of voters in the Republican primary made up their mind in the past week, according to early exit polls conducted by Edison Research for the Associated Press and the television networks.
Republican voters were more negative about their politicians than Democrats, with about half of Republican voters saying they felt betrayed by party officials.
In a sign of Mr Trump’s impact on the race, two-thirds of Republican voters said they support a ban on Muslims entering the US, a position he outlined last year amid rising fears of terrorism emanating from the Middle East.
Among Democrats, Mr Sanders, who narrowly lost in Iowa, had maintained a sizeable advantage over Mrs Clinton in New Hampshire for weeks.
He has appealed to liberal Democrats who believe President Obama has not done enough to address the nation’s disparity in wealth. Mrs Clinton has cast herself as more pragmatic and able to achieve her agenda by working with Republicans, who are likely to continue to control at least one chamber of Congress after the election.
She has been on the defensive, though, about her ties to Wall Street 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.
The north-eastern state was friendly territory for Mr Sanders, a senator from neighbouring Vermont, and was a must-win for him to stay competitive with Mrs Clinton as the race moves to more diverse states that are seen as more Clinton-friendly.
The enthusiasm behind Mr Sanders and Mr Trump underscores the public’s anger with the US political system. Even if neither candidate ultimately becomes his party’s nominee, whoever does will have to reckon with the voter frustration they have tapped.
For Mr Trump, New Hampshire was his state to lose. After his second-place finish in Iowa, he accepted some of the more traditional trappings of presidential campaigns, including smaller town hall meetings with voters.
Still, he closed the final full day of campaigning with a vulgar insult of Mr Cruz.
The Texas senator brushed off Mr Trump’s comments, saying the reason he engaged in insults “is because he can’t discuss the substance”.
Mr Cruz has also seized on anti-establishment sentiment with his uncompromising conservativism. But he was a long shot to win in New Hampshire, where Republican voters are more moderate and less religious than in Iowa.
This old guy might actually win this. Will be keeping a close eye on this election.