It was the Obama speech his supporters had been waiting for: the confidence and the optimism and the promise of better things to come. But how did he win - and what happens next?

Please wait while this video loads. If it doesn't load after a few seconds you may need to have Adobe Flash installed.

But in the spirit of those heady days in '08, that old mantra of hope made a reappearance: a sentiment that has been conspicuous by its absence from most of the campaign, indeed, from most of the last four years.

We rise or fall together as one nation and one people. Barack Obama

"Our economy is recovering. A decade of war is now over... I return to the White House more determined and more inspired than ever before."

Hopeful stuff indeed, although there is the small matter of the fiscal cliff to contend with - and with the Republicans still controlling the House, a job to do to persuade them not to continue blocking the passage of key budget laws.

For whatever Obama's message of change, of a new kind of Washington, the new kind that he promised to work for four years ago but was frustrated by the partisan gridlock that trapped the Capitol in a cycle of mutual blame, much depends on the Republican response.

In Boston, where Mitt Romney's victory rally was enveloped by a miasma of despair, the former governor gave the concession speech he had not planned on, and said he would pray for Obama and called on party officials to work with their rival Democrats for the good of the nation.

For the Republicans, battered and bowed by defeat, there will be the inevitable soul-searching and recriminations: Texas Senator John Cornyn warning of a "period of reflection and recalibration", adding "While some will want to blame one wing of the party over the other, the reality is candidates from all corners of our GOP lost last night."

Republican soul searching

For some on the right, the blame will be laid firmly at Mitt Romney's feet. Most in the party never warmed to him: he appeared too unlikeable, too politically malleable, too moderate, too prone to awkward gaffes. The Romney who came alive in the final weeks of the campaign came alive too late.

House Speaker John Boehner, at a Republican election night party in Washington, also seemed in no mood for compromise, telling the crowd that "there's no mandate for raising taxes".

But look at the result another way, and outspoken conservatives also lost badly. Todd Akin in Missouri, fell victim to his controversial remarks about rape: so too did Richard Mourdock, who lost his Senate bid in Indiana after saying if a woman got pregnant after rape, it was God's plan.

And other liberal measures also scored well on election day. Maine and Maryland became the first states in the Union to legalise same-sex marriage. Two states voted to legalise marijuana. And there's now a record number of lesbian and gay representatives in Congress, including Tammy Baldwin, the first out lesbian to be elected to the US Senate.

In fact it was a day of history breaking records for women too: New Hampshire becoming the first state in history to elect an entirely female delegation to the House and Senate, along with a woman as governor too.

Other Democratic women also won their races, like Elizabeth Warren in Massachusetts, and Mazie Hirono, who is projected to win Hawaii's senate seat over Linda Lingle, who set up an entire 24 hour television channel devoted to promoting her campaign.

Women power

All of this, after an election campaign which was driven by what Democrats called a conservative "war on women", with issues like abortion, birth control and rape raised to an unexpected national prominence.

But amid the hope, this remains a deeply polarised country. The electorate divided just as sharply as four years ago. Women, young people, Hispanics and African Americans backing Obama, older voters, whites and men choosing Romney. But it is that Republican base that is shrinking and the progressive base that is booming. Cause for more of that deep reflection for the high-ups in the GOP.

Celebrations outside white house

Down at the White House, crowds began gathering as the networks called the election for Obama. There was cheering, there were balloons, there were even a couple of former world leaders mingling with the crowd.

A huge stream of young students, all of them African-American, poured down the street from Howard University, as cars honked their horns and drivers waved in celebration. It was an echo of those heady days four years ago, when history was made.

In his Chicago speech, Obama acknowledged that debt to popular democracy and grassroots action: "That's why elections matter. It's not small, it's big, it's important." He called for an America that believed in both opportunity and compassion, an America that would work together.

Four more years, chanted the crowd. Four more years, to make it happen. That's going to need a lot of hope, and more than a little faith.

Felicity Spector writes about US politics for Channel 4 News