NASHUA, N.H. -- Hillary Clinton tried to turn a narrow victory in Iowa into a bit of momentum for her battered Democratic campaign, and Texas Sen. 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 arrived in the northeastern state and quickly scattered for a blitz of campaign rallies and television interviews. Some sought to capitalize on the results of the leadoff Iowa caucuses, while others looked to put the best face on poor showings as they settled in for the Feb. 9 New Hampshire primary -- the second in the state-by-state nominating contests to decide who will be each party's candidate for president in November.

Clinton celebrated her narrow win in Iowa 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. Rallying supporters in Nashua, Clinton cast herself as the At a

Sanders celebrated his stronger-than-expected showing in Iowa, landing at dawn in Bow and addressing a hardy group of supporters who met him. He said the results proved he was a viable candidate. "We're in this for the long haul," he told reporters as his plane flew through the night to New Hampshire.

Indeed, the once-unthinkably-small margin the former first lady, senator and secretary of state held 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 per cent, 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, businessman Donald Trump is looking to rebound after a second-place finish in Iowa that marked a humbling blow to the boastful real estate mogul. Still, he has been leading the polls in New Hampshire.

Cruz's win 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. Coming in a close third, Florida Sen. Marco Rubio was catapulted to the top of the 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 favoured more moderate candidates than Iowa, and more than 40 per cent 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 Republican 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.

Both Cruz and Rubio also had an eye on South Carolina which is the first state in the South to hold a primary. Rubio's 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.

On Tuesday, Trump blamed the media for dismissing his "longshot, great finish."

"Because I was told I could not do well in Iowa, I spent very little there -- a fraction of Cruz & Rubio. Came in a strong second. Great honour," Trump tweeted.

Rubio's advisers cast the Republican race as a three-man contest -- an attempt to box out the other contenders vying for support among 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.

------

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