Joe Biden was elected the 46th president of the US after victory in the battleground state of Pennsylvania propelled him past the 270-vote electoral college threshold, ending Donald Trump’s hopes of re-election.
Mr Biden was declared president-elect four days after polls closed, marking the conclusion of a bitter presidential race that was fought against the backdrop of a pandemic that has killed more than 228,000 Americans.
It also signalled the end of one of the most tumultuous eras in US history as Mr Trump, a New York property developer turned reality television star, took aim at the norms of American politics, pursuing a populist agenda at home and an “America First” stance abroad.
Mr Biden, a 77-year-old son of working-class Scranton, Pennsylvania, became the oldest candidate elected to the presidency. Having served for nearly four decades in the US Senate and eight years as Barack Obama’s vice-president, Mr Biden promised to unify the nation after the tumult of the Trump years.
His running mate, Kamala Harris, will be the first African-American woman and first person of Indian descent to serve as vice-president.
Mr Trump, who complained on Thursday that the election was being “stolen” and threatened more legal action, was the first US president to fail in his bid for re-election since 1992. Mr Trump had repeatedly mocked his rival, telling supporters at a rally that he might leave the US if he lost to “Sleepy Joe”, as he calls Mr Biden.
With ballots still being counted across the country, Mr Biden had received more votes than any presidential candidate in history — more than 74m, about 4m more than Mr Trump. Given Mr Biden’s electoral-college lead, Mr Trump would have had to win Pennsylvania to maintain a potential path to victory.
Mr Biden also holds leads in most battleground states that have yet to be declared, which are expected to extend his winning margin in the electoral college.
Despite Mr Biden’s victory, Mr Trump has signalled he will not readily concede the race. At an angry White House appearance on Thursday evening, the president made wild, unsubstantiated claims of voter fraud and vowed to fight a battle in the courts to retain the White House.
“If you count the legal votes, I easily win,” Mr Trump said. “If you count the illegal votes, they can try to steal the election from us.”
Mr Biden’s election followed a drawn-out counting process after a record number of Americans cast postal ballots to avoid crowds during the pandemic. Some states’ election rules prevented them from tabulating those votes until election day, setting the stage for the days-long delay.
Despite the threat of coronavirus, overall turnout in the vote that ended on Tuesday was also expected to reach levels not seen in a century.
Signalling the importance of Pennsylvania to his strategy, Mr Biden kicked off his campaign 18 months ago in Pittsburgh, an industrial city in the western part of the state, where he pledged to improve the economic situation of middle-class Americans.
During the Democratic primary, Mr Biden argued that he was the best candidate to win back the working-class Democrats who deserted the party in 2016 and helped Mr Trump win rustbelt states in the industrial north. In the final weeks of the race, the two contenders campaigned far more in Pennsylvania than in any other state.
“For the last two years, I have been saying the single most important battleground state is Pennsylvania. This is where the Biden campaign held its official kick-off and where it placed its campaign headquarters,” said Brendan Boyle, a Pennsylvania congressman. “So it is only fitting that it is Pennsylvania that officially puts us over the top.”
Heading into election day, Mr Biden led the national polls and many of the battleground states. On election night, however, he had a rocky start as Mr Trump won the first swing states that were called — Florida and Ohio.
But Mr Biden rallied, winning all three of the “blue wall” industrial states — Pennsylvania, Michigan and Wisconsin — that Hillary Clinton lost in her shock defeat at the hands of Mr Trump in 2016.
In Pennsylvania, Mr Trump took a large early lead after the polls closed, but Mr Biden recovered with the help of postal votes. On Saturday morning, he led Mr Trump with a margin of just over 30,000 votes. Four years ago, Mr Trump beat Mrs Clinton by just over 44,000 votes in the state.
The president appeared to lose some working-class “Trump Democrats”, and suffered sharp losses in the suburbs of cities such as Atlanta and Philadelphia.
Pat Toomey, a Republican Pennsylvania senator, said Mr Trump appeared to have lost because “he ran into trouble with suburban women”.
Mr Biden was also buoyed by African-Americans — in Philadelphia, Pennsylvania’s biggest city, as well as across the country.
On Thursday night, Mr Biden overtook Mr Trump in Georgia, a southern state that has not voted for a Democrat since 1992, as mail-in votes in African-American precincts of Atlanta, as well as its suburban counties, rolled in for the former vice-president in overwhelming numbers.
The general election marked the second time this year that black voters had proved critical to Mr Biden’s fortunes. During the race for the Democratic nomination, Mr Biden was on the verge of a complete implosion until African-American votes in the South Carolina primary and on Super Tuesday carried him to victory and resurrected his campaign.
Thus far, Mr Trump’s legal efforts to stop Mr Biden’s march to the White House have been met with limited success. Judges in Georgia and Michigan have dismissed Republican lawsuits alleging election misconduct, and in Pennsylvania the Trump campaign managed to win only a short pause in the Philadelphia vote count.
Mr Toomey told CNN it was “inevitable” that there would be litigation, and added that he expected that there would be a recount in Pennsylvania.
Follow Demetri Sevastopulo on Twitter