Democrat Joe Biden has defeated President Donald Trump to become the 46th president of the United States and offered himself to the nation as a leader who "seeks not to divide, but to unify" a country gripped by a historic pandemic and a confluence of economic and social turmoil.
"I sought this office to restore the soul of America," Biden said in a prime-time victory speech not far from his Delaware home, "and to make America respected around the world again and to unite us here at home".
Biden on Saturday crossed the winning threshold of 270 Electoral College votes with a win in Pennsylvania. His victory came after more than three days of uncertainty as election officials sorted through a surge of mail-in votes that delayed processing.
Trump refused to concede, threatening further legal action on ballot counting. But Biden used his acceptance speech as an olive branch to those who did not vote for him, telling Trump voters that he understood their disappointment but adding, "Let's give each other a chance."
"It's time to put away the harsh rhetoric, to lower the temperature, to see each other again, to listen to each other again, to make progress, we must stop treating our opponents as our enemy," he said.
"We are not enemies. We are Americans."
Biden, 77, staked his candidacy less on any distinctive political ideology than on galvanising a broad coalition of voters around the notion that Trump posed an existential threat to American democracy.
The strategy, as well as an appeal to Americans fatigued by Trump's disruptions and wanting a return to a more traditional presidency, proved effective and resulted in pivotal victories in Michigan and Wisconsin as well as Pennsylvania, one-time Democratic bastions that had flipped to Trump in 2016.
Biden's victory was a repudiation of Trump's divisive leadership and the president-elect now inherits a deeply polarised nation grappling with foundational questions of racial justice and economic fairness while in the grips of a virus that has killed more than 236,000 Americans and reshaped the norms of everyday life.
Kamala Harris made history as the first black woman to become vice president, an achievement that comes as the US faces a reckoning on racial justice. The California senator, who is also the first person of South Asian descent elected to the vice presidency, will become the highest-ranking woman ever to serve in government, four years after Trump defeated Hillary Clinton.
Harris introduced Biden at their evening victory celebration as "a president for all Americans" who would look to bridge a nation riven with partisanship and she nodded to the historic nature of her ascension to the vice presidency.
"Dream with ambition, lead with conviction and see yourselves in a way that others may not simply because they've never seen it before," Harris told Americans.
"You chose hope and unity, decency, science and, yes, truth ... you ushered in a new day for America."
Nonetheless, Trump was not giving up.
Departing from longstanding democratic tradition and signalling a potentially turbulent transfer of power, he issued a combative statement saying his campaign would take unspecified legal actions.
And he followed up with a bombastic, all-caps tweet in which he falsely declared, "I WON THE ELECTION, GOT 71,000,000 LEGAL VOTES."
Twitter immediately flagged it as misleading.
Trump has pointed to delays in processing the vote in some states to allege with no evidence that there was fraud and to argue that his rival was trying to seize power - an extraordinary charge by a sitting president trying to sow doubt about a bedrock democratic process.
Trump is the first incumbent president to lose re-election since Republican George H.W. Bush in 1992.
He was golfing at his Virginia country club when he lost the race. He stayed out for hours, stopping to congratulate a bride as he left, and his motorcade returned to the White House to a cacophony of shouts, taunts and unfriendly hand gestures.