By Gavin Hewitt
BBC News, New York
The night began slowly in the Manhattan ballroom where the Clinton camp had established its election night headquarters.
Mrs Clinton's win in Massachusetts gave her a welcome boost
It had been billed as a night of celebration but it began as a night of caution. Clinton advisers anxiously scrolled through their Blackberries as the early projections came in.
One of them said they expected a mixed night. And that is how it started off, with Barack Obama winning Georgia.
But the Clinton team were keeping their eyes on the big states: New York, California, New Jersey and Massachusetts.
As the ballroom filled with Hillary Clinton party workers, the mood began to change.
The news that the New York senator appeared to be ahead in Missouri brought an early cheer - although hours later the result was still not clear.
Two factors changed the mood from one of caution into real celebration. Firstly, Massachusetts.
Once the euphoria wears off, it will be back to work for both campaigns
The Clinton camp had been uncertain after the high-powered endorsements of Senators John Kerry and Ted Kennedy for Mr Obama.
When the television screen predicted victory the Clinton crowd leapt to its feet, waving banners.
Advisers were quick to say "it's the economy, stupid", the old Bill Clinton slogan.
They believe that the greater the worry about the economy, the less willing the electorate will be to take a risk on the White House. They will want experience.
There was a second factor in Massachusetts and elsewhere. Hillary Clinton was doing well among women.
Her candidacy resonates with many Americans who believe its time to have a woman in the White House.
Although Hillary Clinton was expected to win in her home state of New York, it was a turning point in the evening.
Barack Obama won some states and did well in some he lost
"All we have to do is win California," said one man, "and the evening is ours."
So they partied, ignoring the states that went to Mr Obama.
However, some advisers struck a less euphoric note. They noticed that Mr Obama had done well even in states he had lost. The race would continue into the weeks ahead.
Some believe that time works to Mr Obama's advantage. His huge rallies have helped diminish Mrs Clinton's lead.
But in the ballroom, they believed the evening belonged to them and that their dream was still alive for the first woman to make it to the White House.
Hillary Clinton, her husband Bill and daughter Chelsea arrived to a rapturous reception.
It was her evening and the former President Clinton quickly moved off the stage to the side.
Mrs Clinton's voice had recovered from the past few days. She admitted that the race would continue. She spoke about the economy and the need that a president did not learn on the job.
Her speech ended almost in a prayer, with phrases like "give us a child that wants to learn".
Later, I asked Bill Clinton whether it really was a victory. Diplomatically, he said he was "very proud of her".
When I asked Hillary Clinton whether it would now be a long race, she declined to answer but her campaign manager Terry McAuliffe said he thought it would go on until 4 March when other big states would vote.
I pointed out that Barack Obama had won in states across the country. He replied: "But we won the big states."
At the time California had not been decided. It is clear the Clinton campaign will claim victory. That is to be expected.
What they cannot know is whether Mr Obama, during the next month, will build support in the way he has done in the past month. This vibrant, fascinating campaign has a way to go.