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.
Mr Trump, a Republican, claimed to have won and vowed to launch a Supreme Court challenge, baselessly alleging fraud.
Earlier Mr Biden, a Democrat, said he was “on track” to victory.
Millions of votes remain uncounted and no candidate can credibly claim victory as yet. There is no evidence of fraud.
With the nation on edge, the final result may not be known for days.
More than 100 million people cast their ballots in early voting before election day, setting the US on course for the highest turnout in a century.
What are the results so far?
Mr Trump has defied the pre-election polls to do better than predicted, but Mr Biden is still in the race and the overall result is not yet clear.
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 president is projected to have held the must-win state of Florida – a major boost to his re-election bid.
The BBC projects Mr Trump will win another conservative sunbelt state, Texas, where the Biden campaign had dreamed of an upset victory.
But Mr Biden could snatch Arizona, a once reliably conservative state. Fox News and the Associated Press have projected Mr Biden will win that state and CBS News, the BBC’s US partner, says it is leaning the Democrat’s way.
A loss for Mr Trump in that once reliably Republican state would be a potentially serious setback.
The Rust Belt battlegrounds of Pennsylvania, Michigan and Wisconsin – which propelled Mr Trump to the White House four years ago – still look as though they could tip either way.
Pennsylvania is considered a must-win for Mr Trump if he is to stave off defeat
Other key states such as Georgia and North Carolina are also toss-ups.
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.
No surprises have emerged yet in the other states.
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 Trump has been hosting an election night gathering inside the White House with about 100 guests.
In a speech at about 02:30 local time (07:30 GMT) he said: “We were getting ready to win this election. Frankly, we did win this election.”
He went on to allege “major fraud on our nation” without providing evidence, adding: “We’ll be going to the US Supreme Court.”
Millions of postal ballots have still to be counted and there is no evidence of fraud.
Earlier, at about 01:00 local time, Mr Biden predicted in his hometown of Wilmington, Delaware, that he would be victorious.
The Democrat said: “We feel good about where we are, we really do. I am here to tell you tonight we believe we’re on track to win this election.”
He added: “We’re going to have to be patient until the hard work of tallying votes is finished and it ain’t over until every vote, every ballot is counted.”
As his opponent spoke, Mr Trump tweeted from the White House: “We are up BIG, but they are trying to STEAL the Election. Twitter labelled the post as potentially “misleading about an election or other civic process”.
A new “non-scalable” fence was put up around the White House ahead of election day. Businesses in the nation’s capital and also in New York City boarded up their premises due to fears of unrest.
The president calls machinery of American democracy into question
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 because of an ongoing pandemic.
After president 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:
What do exit polls tell us about voters?
An exit poll conducted by Edison Research and published by Reuters suggests that four out of 10 voters nationally think the handling of the coronavirus pandemic in the US is “going very badly”.
A third of voters cited the economy as the issue that most concerned them, according to the poll.
Exit poll data also suggest Mr Biden had the edge with women voters by 57% to 42%, with black voters (87% to 11%), with under-29 year olds (64% to 33%) and among voters with or without a college degree.
Mr Trump appeared to hold the advantage with over 65 year olds (51% to 48%).
When will we get a result?
Officials warn that we may have to wait days or even weeks for the presidential result this year because of the expected 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 organisations to predict, or project, the winner in each state much sooner.
Teams of election experts and statisticians analyse 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