Image copyrightAPImage caption
Ms Clinton was hoping to win Iowa by a larger margin - now she's off to New Hampshire

She hadn't officially won yet but she hadn't lost.

So when Hillary Clinton came on stage around 10pm on Monday night in Iowa at a rally in Des Moines' Drake University she didn't declare victory but said she was breathing a "big sigh of relief'" as she thanked Iowans for their support and their hard work on behalf of her campaign.

By the next morning, the final results had come in and Mrs Clinton was officially declared the winner, the first ever woman to win an Iowa caucus and a victory by the narrowest margin in history. The race had already moved 1,300 miles east to New Hampshire and Mrs Clinton was at her first event at Nashua community college by noon.

"I am thrilled to be here in New Hampshire after winning Iowa,'' she said to cheers from the audience. "I can tell you, I've won and I've lost there - and it's a lot better to win."

If this was a win, it wasn't the victory that Mrs Clinton would have wanted in a state where until late last year she was still leading by a wide margin. But the Hawkeye state has given her and her husband much trouble. Bill Clinton didn't bother campaigning there in 1992 when he was running for president and finished in third place in the caucuses. Mrs Clinton also came in third in 2008, a loss from which she never recovered during that race as her rival, then senator Barack Obama, went on to make history and become America's first black president.

Image copyrightAPImage caption
Iowa was not kind to Clinton in 2008

The Clinton campaign had hoped to break the Iowa curse with a better ground organisation, months of preparation and a lot of retail politics in small settings by the candidates. As polls showed Mrs Clinton and her Democratic rival Bernie Sanders in a dead heat, her campaign aides remained cautiously optimistic, predicting a win by a narrow margin. Some who had already gone through the defeat of 2008 were tempering their expectations and contemplated a possible loss.

Monday night in Iowa was a nail biting evening as the votes were tallied and the margin between Mr Sanders and Mrs Clinton narrowed and then widened repeatedly, often by barely a percentage point. Results projected on a screen in the Clinton rally elicited cheers and gasps from the hundreds of supporters who were waiting for her to appear and speak to them.

By the time she left the stage, the race was officially still too close to call. Standing by her side, neither Bill nor Chelsea spoke. And the customary rope line greetings with supporters was scrapped as the Clintons made their way out of Drake University and to the airport to catch a flight to New Hampshire. In the crowd, there was celebration but no jubilation.

Image copyrightReutersImage caption
The Clinton family celebrated on stage on Monday night

"This was a tough night. I had hoped she would do better and considering her name recognition and accomplishments and improved ground operation, she should have," said Joan Lipkin, a Clinton campaign volunteer who had come all the way from Missouri with 160 volunteers to canvass for the former first lady. Lipkin had volunteered in 2008 and said that her heart was broken then. On Monday night, her heart was ''dented'', she said.

"I'm not celebrating because I think Sanders poses a real challenge and many of his supporters are so enraged at the system that they may not come over if she wins the nomination."

How does a US election work? If you want to be president, it helps to be governor, senator, or five-star military general - and have lots of patience

Special report: The BBC's full coverage of the race to the White House

Late into the night, on a chartered plane from Iowa to New Hampshire carrying Clinton aides and the press corps covering her campaign, there was exhaustion after days of campaigning in Iowa and trailing behind the candidate on a bus.

As headlines swirled about a tie between Mrs Clinton and Mr Sanders, Clinton spokesperson Brian Fallon and communications director Jennifer Palmieri tried to get ahead of the story, briefing journalists before the plane took off so stories could be filed.

"We believe strongly that we won tonight," Mr Fallon said. Based on their internal calculations and an app that reported turnout levels and delegate allocations, the Clinton camp said they had already determined they had 22 delegates, one more than Sanders, and that the finally tally would allocate the remaining delegate to Mrs Clinton.

"So while there are still a few precincts remaining the only candidate who can emerge from tonight's caucuses with a win is Hilary Clinton."

When the plane landed at Manchester airport in New Hampshire just before 5am and campaign aides sitting at the front of the plane were able to log into their emails, cheers erupted as they read the news that the final tally had come in from the Iowa Democratic party, in favour of Mrs Clinton. Her two-delegate lead over Mr Sanders is the same as Mr Obama's lead in 2008.

But for a candidate with such a formidable resume running against a self-declared socialist from Vermont, the race for the nomination should be a walk in the park.

Increasingly since late last year, the expectation is that this will be a long hard slog because Mr Sanders has tapped into a sentiment among young voters and a desire for revolutionary change that Mrs Clinton has not yet been able to channel.

Clinton aides also tried to highlight what could be an ominous sign for Mr Sanders who is counting heavily on caucus states to find a path to the nomination.

Image copyrightGetty ImagesImage caption
Bernie Sanders is proving to be a tougher candidate than expected

"Senator Sanders has been saying for weeks that if this caucus was a high turnout affair, he would win. He was wrong," said Mr Fallon. The Clinton aides described Iowa as a left-leaning state that was tailor-made for Mr Sanders' strengths

Turnout was indeed high at 180,000 and it should have favoured Mr Sanders. This could spell trouble for him in future caucus states like Nevada. Mrs Clinton had once described caucuses as ''creatures of the parties' extreme''.

In southern states, Mr Sanders is trailing well behind and failing to connect with African-American voters. Mrs Clinton is banking on these more hospitable grounds to start picking large numbers of delegates to help her advance to the finish line for the nomination.

Iowa caucus results

Media playback is unsupported on your device

Media captionSupporters of the US presidential candidates give their take on their favourite

But first, Mr Sanders is expected to win by a wide margin in the Granite state. So why is Mrs Clinton even bothering to campaign here?

Perhaps because in 2008, this was the state that gave her a morale boost after her Iowa defeat. She won by two points after polls had showed her trailing well behind Mr Obama.

No one in the Clinton camp expects to win New Hampshire, Mr Sanders' backyard and a state where 44% of voters identify as independent. Although he is running for the Democratic nomination, Mr Sanders is the longest serving independent member of congress.

If Mrs Clinton had hoped for a boost in New Hampshire from a sizeable win in Iowa, she will now spend the rest of the week assiduously trying to narrow the gap with her opponent in what is now a two-horse race after former Maryland Governor Martin O'Malley dropped out on Monday night.

"She loves New Hampshire, she's really excited to be here and it's part of the primary process and she's going to march through each part of it and try to win everywhere," said Ms Palmieri.