After all, he had less experience in office than many of his rivals. He was not as well-known. He had the potential electoral liability of being black. No one knew if he was tough enough to stand up to Republican assaults in a nasty campaign.
So what accounts for his success? More than any other reason, he won because he had opposed the invasion of Iraq -- which Clinton and others had endorsed. Obama was the peace candidate of 2008. As the long and costly war dragged on, that was a priceless asset.
Where are those voters now? The majority is probably still in Obama's camp. Most Democrats in Congress have defended the president's attack on Libya. Most have given him the benefit of the doubt in his slow withdrawal from Iraq. Most have gone along with his dramatic escalation in Afghanistan.
But the mood of Democrats may be changing. The liberal magazine The Nation decried the intervention in Libya as "flagrant hypocrisy." John Larson, chairman of the House Democratic Caucus, upbraided Obama for not consulting Congress.
Rep. Dennis Kucinich, D-Ohio, called the war "another disaster." If our involvement lasts weeks or months instead of days, Obama could lose many Democratic members.
Recommended
He has already lost a lot of them on Afghanistan. Recently, 85 House Democrats voted for Kucinich's resolution demanding withdrawal of U.S. forces by Dec. 31, with 99 voting no. Sen. Sherrod Brown, D-Ohio, says both he and "a lot of my colleagues" in the Senate will also push for a speedy and complete departure.
Obama has promised to withdraw some troops beginning in July, but he is committed to staying around till 2014. An unnamed senior official told ABC News this month "a substantial reduction is now 'unlikely.'" Barring unexpectedly quick gains in security, most of our troops will still be there when the Iowa caucuses are held.
The combination of Afghanistan and Libya could bring a bitter end to the romance between Democratic liberals and Obama. Many of them were already disappointed with him for extending the Bush tax cuts, bailing out Wall Street, omitting a public option from the health care overhaul, offering to freeze domestic discretionary spending and generally declining to go after Republicans hammer and tong.
Had he rejected demands to use military force against Moammar Gadhafi, they would have had the solace of seeing the hawks finally put in their place. Instead, Obama did in Libya about what Clinton or John McCain probably would have done.
Liberal doves are feeling a deep sense of betrayal after watching their champion of peace drop bombs on an Arab country. If the war drags on inconclusively, or if Obama feels compelled to expand our involvement, their discontent will grow.
Then what? Then he could face what Lyndon Johnson faced in 1968: a Democratic primary challenger appealing to those tired of war and mistrustful of their president.
Whom might that be? Maybe former Sen. Russ Feingold of Wisconsin, who opposed the Iraq war and provided the sole vote against the original Patriot Act. Maybe Sen. Jim Webb of Virginia, who is not running for re-election and has criticized the Libya attack. Or maybe someone else.
It isn't important whether the challenger is plausible as president. What's important is that alienated Democrats have some way to express their anger and disenchantment. No liberal insurgent is likely to beat Obama. But Obama can lose even if he wins.
Eugene McCarthy, after all, came in second to Johnson in the 1968 New Hampshire primary. Ted Kennedy couldn't unseat Jimmy Carter in 1980. Pat Buchanan lost every primary against George H.W. Bush in 1992. None of those presidents, however, got a second term in office.
A Democratic challenge could be fatal to Obama's re-election bid, for several reasons. It would highlight the ways in which he has failed liberals. It would make him look beleaguered and vulnerable. It would drain resources that could be used against Republicans. And the fight could embitter many Democrats, inducing them to stay home on Election Day.
In 1968, McCarthy's campaign posters said, "He stood up alone and something happened." It could happen again.