In the early hours of Wednesday Donald Trump and Joe Biden still did not know who had won the presidential election but one thing was clear: Democrats had not secured the big victory some had anticipated.
Heading into election day, Democrats were not only confident they would avoid a repeat of the surprise loss in 2016, but were counting on several factors to give Mr Biden a strong tailwind. Instead, the Democratic challenger remains in a precarious position.
Democrats had been buoyed by polls that showed Americans — including many Republicans — were frustrated with how Mr Trump had handled the coronavirus pandemic. They had also banked on suburban Republican women abandoning the president and argued that Mr Biden had the right background to win back white, working class voters who had switched to Mr Trump four years ago. Finally, Democrats believed Mr Biden would do better with black voters than Hillary Clinton in 2016, and would appeal to anti-Trump Hispanics.
But as the world waited for results from key outstanding states — Nevada, Wisconsin, Michigan and Pennsylvania — some of the weaknesses of the Democratic campaign were apparent.
One of the first signs of problems for Mr Biden emerged when results arrived from Florida's Miami-Dade, a 2.7m-strong heavily Hispanic county that includes Miami. While Florida was viewed as one of the tightest swing states, Mr Biden's weakness with Hispanics in the area appeared to have stopped the Democrats reclaiming the state from Mr Trump.
"We as a party still have a lot of work to expand the number of Latino voters in particular who vote Democratic. What happened in Florida is not acceptable," said Jim Manley, who served as a top aide to Harry Reid, the former Democratic Senate leader whose state of Nevada boasts a very large Hispanic population.
Chuck Rocha, a consultant who helped Bernie Sanders win a big proportion of Hispanics in the Democratic primary race against Mr Biden, said the Florida result underscored how the Biden campaign erred in the state.
"Tonight proves the Latino vote is a persuadable universe, but Democrats did not treat it as such," Mr Rocha said. "So we are paying the price for not starting early and often, as they did with persuadable white voters."
Mr Rocha said that mistake would resonate beyond Florida, though to a lesser extent in states such as Arizona that lacked Florida's large numbers of conservative Cuban Americans. Mr Biden won Arizona, validating his strategy to try to expand the Democratic base in a state that had voted for a Democrat only once since Harry Truman won in 1948.
The plan to attack Mr Trump over his response to the pandemic also appeared to have been less effective than the Democrats had expected. The president's approval ratings appeared to dip in early October, after he was hospitalised for Covid-19, and polls showed most Americans disapproved of his handling of his own infection.
But as election results trickled in, it was clear that many voters had not cast their ballots with Covid-19 in mind. According to a CNN exit poll, the economy — the one issue where Mr Trump consistently polled better than Mr Biden — was the most important issue for voters, followed by racial inequality and coronavirus.
The Biden campaign also banked on Republican women in the suburbs abandoning the president. Many Democrats looked to their significant gains in the 2018 midterm elections — which were driven by women — as proof that the party could replicate those results in the presidential race. But the party found itself losing some of the districts it had flipped in 2018 and that polls had suggested would remain Democratic.
Video: US election 2020: Joe Biden urges supporters to 'keep the faith'In Miami-Dade, two Democrats who had taken Republican seats two years ago, were ousted — partly because of the party's poorer-than-expected performance in the Latino community. But they also lost seats in Charleston, South Carolina, and a swath of New York's Long Island.
Democrats also failed to flip several districts in the Houston, Austin and San Antonio suburbs. Those lossses contributed to Mr Biden's failure to win Texas, a state that had not voted for a Democrat since 1976 but which has become more liberal because of demographic changes.
Mr Biden is hoping for better results in the suburbs in Pennsylvania and Michigan, two states that could be crucial to determining whether Mr Biden can emerge victorious when all of the outstanding votes have been tallied.
Exit polls from ABC News found that Mr Biden had a 3-point margin over Mr Trump among suburban voters. Among female suburban voters, Mr Biden led Mr Trump 55 per cent to 44 per cent, the polls found.
The suburban vote could become increasingly important if — as appears to the case — Mr Biden has not done as well winning back the so-called Trump Democrats in Pennsylvania and the Midwestern states.
During the Democratic primary, Mr Biden emphasised that he had grown up in a working class family in Pennsylvania and was a longtime supporter of workers' unions. Democrats hoped that background would allow him to rebuild the "blue wall" of Michigan, Wisconsin and Pennsylvania that Mr Trump broke four years ago when he won the former Democratic strongholds.
Mr Biden had stepped up campaigning in Ohio in recent weeks after local Democrats told him he had a chance of victory. But Mr Trump won the rust-belt state with almost the same level of support as he had in 2016, raising concerns about neighbouring Pennsylvania.
Mr Trump had a strong lead in Pennsylvania early on Wednesday but the state has more than 1m absentee ballots to count. Democrats were hopeful that African Americans and suburban women in Philadelphia would help Mr Biden win a state that had voted Democratic from 1992 to 2016. The answer may determine the final outcome.
"It's just still too early to tell because there are so many uncounted mail ballots in Philadelphia," said Brendan Boyle, a Democratic congressman and Biden supporter from Philadelphia. "They still have more than half of the vote left to count."
- Financial Times