The outcome of the US presidential election is on a knife edge, with Donald Trump and his rival Joe Biden neck and neck in key swing states
No candidate can credibly claim to have won as yet, and both campaigns said they had potential paths to victory.
Mr. Biden’s campaign said the race was “moving to a conclusion in our favor”.
But Mr. Trump, a Republican, claimed to have won and vowed to launch a Supreme Court challenge, without providing evidence of fraud.
Several key states are expected to finish counting by the end of Wednesday but the election may not be decided for days.
The Biden campaign said it expected to win because several states would be called for them on Wednesday or Thursday, but the Trump campaign said it was confident that the maths was in its favor.
The US is on course for the highest electoral turnout in a century. More than 100 million people cast their ballots in early voting before election day, and tens of millions more added their vote on Tuesday.
What are the results so far?
Mr. Trump has defied the pre-election polls to do better than predicted, but Mr. Biden has a narrow lead in several key states.
In the US election, voters decide state-level contests rather than an overall, single, national one.
To be elected president, a candidate must win at least 270 votes in what is called the electoral college. Each US state gets a certain number of votes partly based on its population and there are a total of 538 up for grabs.
The vote tallies in the Rust Belt battlegrounds of Pennsylvania, Michigan, and Wisconsin – which propelled Mr. Trump to the White House four years ago – are very close.
Mr. Biden is currently ahead in Wisconsin and Michigan and a Trump lead in Pennsylvania could still potentially be overturned by mail-in votes.
However, Republicans in Wisconsin said they would immediately request a recount in the state, claiming “reports of irregularities in several counties”. And in Michigan and Pennsylvania, the Trump campaign has filed lawsuits to stop the counting of ballots.
Mr. Biden could also snatch Arizona, a once reliably conservative state, and is ahead in Nevada, although counting is not expected to resume there until Thursday.
However, the president is projected to have held the must-win state of Florida, and another conservative sunbelt state, Texas, where the Biden campaign had dreamed of an upset victory.
Georgia and North Carolina are also very close, though currently leaning Mr Trump’s way.
Mr Trump will keep hold of Ohio and Missouri, known as bellwether states because they have so often predicted the eventual winner, according to the BBC’s projection.
Mr Trump is also projected by the BBC to win Nebraska, though Mr Biden picked up one vote there in the electoral college, which could turn out to be crucial.
But while the two candidates do battle for electoral college votes, Mr Biden has a clear lead in the national vote, with 50% – 2.5 million votes more than Mr Trump. Hillary Clinton received nearly three million more votes than Mr Trump in 2016 but still lost the election.
Control of Congress – the two-chamber legislature – is also at stake. As well as the White House, Republicans are vying to hang on to a majority in the Senate. The House of Representatives is expected to stay in Democratic hands.
What are the candidates saying?
Mr Biden is expected to address the nation later on Wednesday.
He tweeted: “We won’t rest until everyone’s vote is counted.”
The campaign said it expected a result in its favour by the end of the day.
Overnight Mr Biden said in a speech to supporters in his hometown of Wilmington, Delaware, that he was on track to win.
He added: “We’re going to have to be patient until the hard work of tallying votes is finished.”
Mr Trump, meanwhile, alleged in a tweet that there had been “surprise ballot dumps”, causing his lead in several states to disappear, without providing any evidence. Twitter labelled the tweet as possibly disputed and misleading.
At an election night gathering at the White House, the president said there was “major fraud” and “we’ll be going to the US Supreme Court”, again without providing evidence.
“We want all voting to stop,” the president said, apparently meaning that he wants to block the counting of postal ballots, which can be legally accepted by some state election boards after Tuesday’s election.
His rival’s campaign condemned the president’s statement as “outrageous, unprecedented, and incorrect”, calling it a “naked effort to take away the democratic rights of American citizens”.
A lawyer for the Biden campaign, Bob Bauer, said any Supreme Court challenge would lead to “one of the most embarrassing defeats a president ever suffered before the highest court in the land”.
Donald Trump has been telegraphing for weeks that if the presidential election were close, he would accuse his Democratic opponents of committing voter fraud and trying to steal victory away from him. In the early hours of Wednesday morning, he did exactly that.
It is the doomsday scenario that many Americans were fearing, where the president of the United States – from the White House itself – would undermine ballot-counting.
It’s a process that stretches on for days after the election even in normal circumstances, where voters haven’t turned to postal or early voting in large numbers because of an ongoing pandemic.
After Mr Trump spoke, Vice-President Mike Pence tried to smooth over his remarks, declining to declare premature victory and insisting that all the legally cast votes will be counted. It was much more in line with how a US leader would be expected to behave in a moment of political uncertainty.
The damage had been done, however. Whether Mr Trump ultimately wins or loses, he has cast a pall on this election, as he calls the very machinery of American democracy into question.
Read more from Anthony:
When will we get a result?
Officials had warned before election day that we might have to wait days or even weeks for the presidential result this year because of the surge in postal ballots.
Different states have different rules for how – and when – to count postal ballots, meaning there are large gaps between them in terms of reporting results. In some states, it will take weeks to get complete results.
The last time the result was not clear within a few hours was in 2000, when the winner, George W Bush, was not confirmed until a Supreme Court ruling was made a month later.
In the meantime, it falls to US media organizations to predict, or project, the winner in each state much sooner.
Teams of election experts and statisticians analyze a mixture of information such as exit poll data – interviews at polling stations and phone calls with early voters – and actual votes counted.
In a state that always votes for one party, the results are sometimes projected as soon as voting ends, based on exit polls. In a closer contest, however, the data will draw heavily on the actual count.
This year the BBC gets its data from polling firm Edison Research who do the field work for the exit polls and work with US networks, ABC, CBS, CNN and NBC. Record levels of early voting have complicated this count, so there is no race to be first. If the BBC and its partners don’t believe there is enough data to project a winner, they won’t – even if others are doing so.