Updated: Tuesday, February 2nd, 2016 at 11:17pm

Democratic presidential candidate Hillary Clinton and her husband, former President Bill Clinton, pose for a selfie with employees at Market Basket Supermarket in Manchester, N.H., on Tuesday. (Elise Amendola/The Associated Press)

NASHUA, N.H. (AP) — Hillary Clinton tried to turn a skin-of-her-teeth victory in Iowa into a bit of momentum for her battered Democratic campaign, and Ted Cruz sought to lock in his spot at the top of the Republican field as the presidential candidates packed up Tuesday and sped to New Hampshire.

The contenders descended on the Granite State – along with scores of volunteers and staff – and quickly scattered for a blitz of campaign rallies and television interviews. Some sought to capitalize on the results of the Iowa caucuses, while others looked to put the best face on poor showings as they settled in for the Feb. 9 New Hampshire primary and beyond.

Clinton celebrated her narrow win in the leadoff caucuses and said she expected a tough fight in New Hampshire, noting she'll be campaigning in the “backyard” of Vermont Sen. Bernie Sanders, where he has been running strong for weeks.

ADVERTISEMENT

Sanders celebrated his stronger-than-expected showing in Iowa, landing at dawn in Bow and addressing a hardy group of supporters who met him. “We're in this for the long haul,” he told reporters as his plane flew through the night to the season's second showdown.

Indeed, the once-unthinkably-small margin between the former first lady, senator and secretary of state over the self-declared democratic socialist suggested the Democratic contest is headed toward a protracted fight between the party's pragmatic and progressive wings.

Clinton defeated Sanders by less than three-tenths of 1 percent, the closest in Iowa Democratic caucus history, the state party said. Sanders said his campaign was still reviewing the results and did not concede.

On the Republican side, Cruz's win in Iowa provided a twist worthy of the topsy-turvy race. The Texas senator proved to be beloved by evangelicals, even if maligned by many others in his party, and adept at mounting a powerful grass-roots operation. Donald Trump's second-place finish was a humbling blow to the boastful mogul who had dominated the polls for weeks. Coming in a close third, Marco Rubio was catapulted to the top of heap of establishment candidates vying to be the party's preferred alternative to Trump or Cruz.

For Republicans, the pivot to New Hampshire meant the still-crowded cast of candidates has turned toward a less religious and mostly undecided electorate.

New Hampshire has historically favored more moderate candidates than Iowa, and more than 40 percent of the state's voters are not registered in any political party, giving them the power to choose which party's' primary to vote in. Polls show well over half of GOP voters have yet to make up their minds.

That may be good news for Cruz, who is hoping to avoid the conservatives' Iowa curse. Unlike past candidates who found love in Iowa but fizzled fast, Cruz argued Tuesday that his campaign has staying power, resources and broad appeal.

“This is the power of the conservative grass roots, and there is a silent majority in this country,” Cruz told CNN. “This is center-right country. This is a country built on Judeo-Christian values. And the heart of my campaign is based on common-sense principles.”

ADVERTISEMENT

As his campaign kept one eye on New Hampshire, the other was on South Carolina, where his fiery conservatism is expected to resonate better than in New England. Cruz held an evening rally in Greenville, S.C., before returning to New Hampshire.

Rubio on Tuesday told supporters in Exeter, “Perhaps no state in the country demands more of candidates than New Hampshire does.” Still, he too was looking ahead. His campaign announced the endorsement of South Carolina Sen. Tim Scott, the only African-American Republican in the Senate.

And then there is Trump, who may be the candidate most in need of a comeback after Iowa. Despite stealing the spotlight and driving the debate for months, he appears to have been out-organized by Cruz in Iowa.

Trump lashed out at the media Tuesday for framing his second-place finish in Iowa as a loss. “The press didn't treat me right,” he told a crowd in Milford, New Hampshire. “Instead of saying, 'Unbelievable job!' they said, 'Well, yeah, he did all right.'”

Trump picked up the endorsement of former Massachusetts Sen. Scott Brown, whose backing marks Trump's first endorsement by a current or former senator. It provides additional evidence that some in the Republican establishment are beginning to warm to a potential candidacy.

Rubio's advisers cast the GOP race as a three-man contest – an attempt to box out the other contenders vying for mainstream Republicans.

That won't be easy. Ohio Gov. John Kasich, former Florida Gov. Jeb Bush and New Jersey Gov. Chris Christie on Tuesday stormed into New Hampshire with packed campaign schedules. All three are hoping the state will breathe life into their flagging campaigns.

Democrats spent much of the day wrestling over the Iowa results. Sanders' campaign declared victory even in defeat, saying the results were a “giant step” toward proving he was a viable candidate.

Clinton, meanwhile, played up her win – no matter how narrow – while setting expectations for a difficult road ahead.

Rallying supporters in Nashua, she urged voters to get practical and ask themselves when they hear candidates' promises: “Does this just sound good on paper or does this get done? And who is mostly likely going to be able to deliver?”

Associated Press writers Ken Thomas, Kathleen Ronayne, Steve Peoples in New Hampshire, and Bill Barrow in South Carolina contributed to this report.