MANCHESTER, N.H. -- Donald Trump and Bernie Sanders routed their rivals in the New Hampshire primary Tuesday, avenging their Iowa losses to keep the mad scramble of the 2016 presidential campaign alive with dozens of contests to come.
Iowa winner Ted Cruz, Jeb Bush and Marco Rubio landed in a cluster, no better than third, depriving Republicans of a breakthrough performance that could have set up a strong moderate challenger to Trump. Second place went to Ohio Gov. John Kasich, an upbeat campaigner whose ability to run a strong national campaign is in question.
It was a disappointing night both for Rubio and his tormentor in the latest Republican debate, Gov. Chris Christie of New Jersey.
Sanders, the independent socialist senator challenging Democratic front-runner Hillary Clinton, and Trump, the political neophyte and provocateur of the Republican race, tapped New Hampshire's occasional indulgence in political insurgencies to prevail in the nation's second contest for the nomination.
Together they are would-be slayers of the political establishment, and a loss for either one would have been potentially devastating to their hopes.
Instead, Trump put beef behind his braggadocio, and celebrated his solid victory by vowing anew that "I'm going to be the greatest jobs president" and "beat all of these countries that are taking so much of our money away from us."
And Sanders was full of fire at his victory rally, declaring, "We have sent the message that will echo from Wall Street to Washington, from Maine to California, and that is that the government of our great country belongs to all of the people and not just a handful of wealthy campaign contributors and their super PACs."
Still, Sanders, from Vermont, moves on to tougher territory in South Carolina, where Clinton has been favored and where a racially diverse population serves up an electorate that looks more like America than rural, small-town and mostly white Iowa and New Hampshire.
Trump, too, will be tested on whether he can run a truly national campaign, despite preference polls that find him on top, and whether he can unleash the organizational skills needed to slog toward the nomination state by state.
How Sanders Won
Sanders attracted a broad coalition of New Hampshire voters, gathering a majority of votes from men, independents and voters under 45, as well as a slim majority of women, according to early exit polls conducted by Edison Research for The Associated Press and the television networks
The polls found that Clinton won the majority of those over 65 and those with incomes over $200,000 a year. The age gap first seen in Iowa, where younger voters backed Sanders and older ones, Clinton, appeared to be replicated to some extent in New Hampshire.
After conceding to Sanders, Clinton said she knows she has "some work to do, particularly with young people."
The exit polls also suggested Clinton has a struggle being trusted and relating to average people.
Nearly half who voted in the Democratic primary said that between Sanders and Clinton, they thought only Sanders is honest and trustworthy. And just over 10 percent said that between the two, only Clinton shares their values.
Clinton fell far short in New Hampshire after an unsatisfying hair's-breadth win in Iowa.
How Trump Won
Trump capitalized on disaffection and outright anger with Washington, which was more pronounced in the Republican race, the exit polls found. He drew both from conservative and moderate Republicans.
His hardline positions on immigration and national security appeared to help him as well.
Although nearly 6 in 10 Republicans said they supported giving immigrants in the U.S. illegally the opportunity to apply for legal status, a large minority didn't - and two-thirds of Republican voters backed Trump's contentious position that non-citizen Muslims should be temporarily barred from entering the country.
Rubio, Kasich, Bush and Christie struggled over who could consolidate the support of moderate or establishment-minded Republicans. Kasich finished second behind Trump, but questions persist about his ability to run a national campaign.
IN DEPTH: What's next for Kasich?
Until his famously flustered debate performance -- at Christie's hands -- Rubio was seen as the man on the move, with a strong chance to outdistance rivals other than Trump. That didn't happen.
The Excitement Factor
Sanders and Trump had it, Clinton and most Republicans didn't.
Gail Malliaros-Golec, 64, of Pelham, a Trump volunteer for months, said she knew things were going well when she saw the reaction at the poll site where she was helping out.
When cars were pulling in, she said, people of all ages were "honking horns and thumbs up. People just almost causing accidents. Seriously."
She went on: "It was like a drug, seriously. People were just so excited."
For Sanders, the large, passionate rallies of many months finally paid off.
Cait McKay, 29, of Manchester backed Sanders because he's committed to "building a better society for everyone" and "he's not taking the negative ads or the negative stabs at everyone."
"I've seen so much from so many people," she said. "I'm excited about the turnout. I'm excited about my candidate."
Campaign in Transition
The close-up campaigning in coffee shops and gyms in far-flung snowy expanses shifts now to bigger states, where those who come out of New Hampshire intact will need the advertising muscle and organizational strength to score big, fast and increasingly at a national level.
Woodward reported from Washington. Associated Press writers Alex Sanz, Holly Ramer and Philip Marcelo in New Hampshire contributed to this report.