Joe Biden has defeated Donald Trump and captured the White House, pledging to be a president who "seeks not to divide, but unify".
"I sought this office to restore the soul of America," the president-elect said in his victory speech, "to rebuild the backbone of this nation, the middle class and to make America respected around the world again."
"Let us be the nation that we know we can be. A nation united, a nation strengthened, a nation healed. The United States of America."
His victory followed four days of anxious vote counting, as election officials ploughed through stacks of mailed-in ballots.
Winning the state of Pennsylvania, the Democratic challenger crossed the threshold yesterday, securing more than the 270 Electoral College votes needed to take the US presidency.
The election was close: more than 74 million votes for Biden were already counted and 70 million for Trump.
Incumbent US President Trump has refused to concede, threatening further legal action on ballot counting.
Departing from long-standing democratic tradition, Trump instead issued a combative statement saying his campaign would take unspecified legal actions and he would "not rest until the American people have the honest vote count they deserve and that democracy demands".
He 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.
Jared Kushner, Trump's son-in-law and senior adviser, has reportedly approached the President about conceding the election.
There has been no communication between Biden and Trump, or between any representatives from either campaign, since the race was called, Biden-Harris deputy campaign manager Kate Bedingfield told CNN.
His refusal to concede has no legal implications - but it could add to the incoming administration's challenge of bringing the country together after a bitter election.
Trump is the first incumbent president to lose re-election since Republican George HW Bush in 1992.
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, paid tribute to the women, particularly black women, whose shoulders she stood on as she shattered barriers that have kept mostly white men entrenched at the highest levels of American politics for more than two centuries.
"Tonight I reflect on their struggle, their determination and the strength of their vision to see what can be unburdened by what has been," Harris said in her victory speech, wearing a white suit in tribute to women's suffrage.
"While I may be the first woman in this office, I will not be the last," she said in her first post-election address to the nation.
The 56-year-old is now the highest-ranking woman ever to serve in the US government, four years after Trump defeated Hillary Clinton.
Harris introduced Biden, 77, as " a president for all Americans".
"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 said. "You chose hope and unity, decency, science and, yes, truth ... you ushered in a new day for America."
As of last night, Biden was on track to win the national popular vote by more than 4 million, a margin that could widen as ballots continue to be counted.
But Trump repeated his claim that he'd won the election, firing out an all-caps tweet that he'd secured a second term with "71,000,000 LEGAL VOTES" - which was immediately flagged as misleading by the social media giant.
He was golfing at his Virginia country club when it was announced that he had lost the race. Trump 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.
And while Trump hadn't publicly accepted the result, the city around him had: with cars honking, music blaring and jubilant Americans taking to the streets in Washington DC to celebrate his defeat.
There were raucous scenes in New York City as spontaneous block parties broke out: people ran out of their buildings, banging on pots, dancing and high-fiving strangers amid honking horns.
In Pennsylvania, a large crowd gathered to celebrate outside the Convention Centre, where officials continue to count votes.
But a large segment of the population were not happy with the result, as pro-Trump protesters were seen gathering in Michigan.
Video footage was posted online of opposing groups fighting in Lansing in Michigan.
As counting continues in some states, Biden had already received more than 74 million votes, more than any presidential candidate before him.
Prime Minister Jacinda Ardern congratulated Biden and Harris on their victory and said she looked forward to strengthening the ties between both nations in the coming years.
"There are many challenges in front of the international community right now, the message of unity from Joe Biden positions us well to take those challenges on," she said in a statement.
She acknowledged outgoing President Trump, saying New Zealand had enjoyed positive and co-operative relations with the US during his presidency.
Former prime minister Helen Clark called Biden's victory speech "inspiring".
"This is the time to heal in America," she tweeted, quoting the president-elect's victory speech.