Hillary Clinton's aides have suggested the New York senator is effectively ending her presidential bid. Photograph: Paul J Richards/AFP/Getty Images

It barely seems credible now but there was a time when it seemed the Democratic nomination was Hillary Clinton's for the taking. The air of certainty in January 2007 was convincing when Clinton declared from a sofa at her Washington home: "I'm in and I'm in to win."

Two Democratic senators and two former governors swiftly pulled out rather than get between Clinton and the White House. Then along came Barack Obama and the aura of inevitability that was crucial to Clinton's strategy vanished.

"The Clinton campaign was meant to be shock and awe: big events in big states, sweep the board on Super Tuesday, overwhelm the less well-known competitors," said Chip Smith, who was deputy campaign manager for Al Gore in 2000.

"Unfortunately, Obama uprooted that strategy. Inevitability isn't a viable strategy against a well-funded candidate with a powerful message."

It is unclear whether there was anything Clinton could have done to stop a gifted politician such as Obama, once his early win in Iowa and prodigious fundraising ability established that he really did have a chance of winning the Democratic nomination.

Clinton also may have destroyed any chance of a comeback after being caught out in her fib about coming under sniper fire while in Bosnia in the 1990s. The lie crystallised voter unease with Clinton, and held back chances of a grand comeback in Pennsylvania. In April, a Washington Post/ABC News poll found that 61% of American voters considered her dishonest and untrustworthy.

But Democratic operatives see a number of serious mistakes in planning and strategy in Clinton's campaign. They include:

· A message out of step with an electorate that desperately wanted change.

· Failure to devise a plan B if she failed to knock Obama out of the race in Iowa or by Super Tuesday on February 5.

· Failure to build a grassroots organisation. The campaign, caught up in its self-created myth of invincibility, also lost track of spending, burning through $120m (£61m) so fast that Clinton could not run television ads in several key states in February.

· Mishandling the campaign's greatest asset - Bill Clinton - turning him into one of his wife's greatest liabilities.

The first signs that Obama could pose a serious threat to Clinton's ambitions emerged last summer. Field organisers in Iowa reported back to headquarters in Arlington, Virginia, that voters were cool to her emphasis on experience. Iowans wanted change, and anything associated with Washington was viewed as tainted. That was a rebuff to the central premise of Clinton's campaign, derived by her then chief strategist, Mark Penn, that in the post-George Bush, post-9/11 world voters would feel safer with a more experienced candidate. Penn left the campaign in April amid controversy over his work for outside clients, especially the Colombian government.

At first, there seemed some basis for Penn's reasoning. After all, Clinton could hardly run as a Washington ingénue after spending 15 years in the White House or Congress. As the first viable female candidate for the White House, she also wanted to bury the suggestion she lacked the qualifications or the strength to serve as commander in chief.

But voters were not impressed by Clinton's skills as a survivor - they wanted to move past the battles of the 1990s. Her campaign's failure to read the signs left her cast as a creature of the status quo, said Ken Goldstein, an expert in campaign advertising at the University of Wisconsin. "Hillary Clinton could have been portrayed as a change candidate," he said. "If you look at the way women candidates typically run, they typically run as change candidates because by definition they are not old white guys."

Instead, Clinton stuck to a blandly centrist message that was calibrated to voters in a presidential election rather than the Democratic party activists who dominate the primary process.

She also stuck to her decision to vote for the war in Iraq in 2002. Although Clinton now opposes the war, her refusal to apologise for that original decision infuriated party activists. It also made her vulnerable to Obama's questioning of her judgment.

By mid-2007 Clinton's former deputy campaign manager, Michael Henry, grew so concerned at her prospects in Iowa that he wrote a memo, later leaked in the press, suggesting she skip the state and focus on the next contest in New Hampshire.

And that was just the start of Clinton's problems in Iowa. Iowa is a caucus state, where the outcome of nomination contests are typically determined by motivated Democratic activists.

Clinton's local campaign staff complained throughout the summer that they needed more staff to compete with Obama's grassroots organisation.

Meanwhile, the Obama campaign was developing an organising model that would deliver Iowa and 11 of the 13 caucus states that followed. The campaign opened offices in states with barely two dozen delegates at stake - including those as remote as Alaska and North Dakota.

By the time caucus day approached, the Obama campaign invariably had more volunteers than they could reasonably deploy. The Clinton campaign did not swing into action until about a week before the Iowa caucus. She finished third.

Her campaign took far too long to correct its early mis-steps. Confronted with Obama's megawatt charisma, she wheeled out her campaign's resident rock star: Bill Clinton. But the spectacle of the former president, white-haired and red-faced, ripping into his wife's opponent dredged up memories of scandal and invective - a living example of the "old politics" Obama had promised to end.

While Obama's candidacy was looking forward, Hillary Clinton's just seemed to be looking back. The backlash against Clinton in South Carolina - which she lost by 29 points - carried on through February. In traditionally Republican states Clinton lost by staggering margins: 62 points in Idaho, 48 points in Kansas.

But even after February's spectacular defeats, Clinton showed surprising areas of strength - especially among white working class males. She retooled her message, portraying herself as a populist champion for working people.

As it turned out, Clinton's campaign was as badly prepared on finances as it was to countering Obama's appeal. After outsize spending on polling, consultants, and prime venues for rallies, her campaign was broke by February. Obama outspent her on television advertising in every state - and in some states her campaign ran no ads at all. Even in states where Clinton ran strongly - Ohio, Pennsylvania and Indiana - Obama's campaign was always better at getting its supporters to the polls.

By April, Clinton was forced to dip into the family fortunes, lending her campaign a total of $11m. Her campaign crossed the finish line $20m in debt.

"Everything was done with the pageantry of a general election candidate," said one consultant.

But as it turns out Clinton will not be making it to the general election after all.