The outcome of the US presidential election is on a knife edge, with Donald Trump so far doing much better than the pollsters predicted.
Both Mr Trump and his Democratic challenger Joe Biden are running neck and neck in a number of swing states.
The president has a narrow lead in the must-win state of Florida – a major boost to his re-election bid.
But Mr Biden could snatch Arizona, a once reliably conservative state. The vote caps a long and bitter race.
Other key states such as Georgia, Pennsylvania, Wisconsin, Michigan and North Carolina are toss-ups.
More than 100 million people cast their ballots in early voting before election day on Tuesday – setting US on course for its highest turnout in a century.
Parties fight for control of Congress
Control of Congress is also at stake. As well as the White House, Republicans are vying to hang on to a Senate majority.
Republicans have lost a Senate seat in Colorado, but gained one in Alabama.
Mitch McConnell, the Republican Senate leader, and Trump ally Lindsey Graham have both been re-elected.
The House of Representatives is expected to stay in Democratic hands.
What are the presidential results so far?
With partial results in, Mr Biden has a solid lead in Arizona. Fox News has projected Mr Biden will win that state and CBS News, the BBC’s US partner, said it was leaning the Democrat’s way.
But the Trump campaign said it was too early to declare a winner in Arizona. A loss for Mr Trump in that once reliably Republican state would be a potentially serious setback.
Another sunbelt state, Texas, is leaning Mr Trump’s way, projects CBS News. Fox has forecast that Mr Trump will win the Lone Star state.
The battlegrounds in the Midwest and Rust Belt of Pennsylvania, Michigan, Iowa and Wisconsin look as though they could go either way.
Pennsylvania, along with Florida, is considered a must-win for Mr Trump if he is to stave off defeat.
Cliffhanger counts are also under way in two more critical swing states on the East Coast, Georgia and North Carolina.
No surprises have emerged yet in the other states.
Mr Trump will keep hold of Ohio and Missouri, known as a bellwether states because they have so often predicted the eventual winner, according to the BBC’s projection.
The BBC also projects Mr Trump will also win Alabama, Mississippi, Idaho, Wyoming, South Carolina, Kansas, Nebraska, Utah, Louisiana, Indiana, North Dakota, South Dakota, Kentucky, Tennessee, Oklahoma, Arkansas and West Virginia, all as expected.
Mr Biden will retain his home state of Delaware, along with California, Virginia, New York, Oregon, Washington, Illinois, New Hampshire, Connecticut, New Mexico, Colorado, Vermont, Maryland, Massachusetts, New Jersey and Washington DC, according to BBC projections.
CBS projects Montana is leaning Mr Trump’s way, while Minnesota, Nevada, Maine, Hawaii and Rhode Island were trending towards Mr Biden.
Mr Trump narrowly lost Minnesota in 2016 and his campaign is hoping to pick it up this time.
Voting ended on the US West Coast at 23:00 EST (04:00 GMT on Wednesday).
National opinion polls gave a firm lead to Mr Biden, but pointed to a closer race in the handful of states that are likely to decide the outcome.
Projections are based on a mixture of exit poll data and, in most cases, actual votes counted – and are only made where there is a high degree of certainty.
In the US election, voters decide state-level contests rather than an overall, single, national one.
Appearances can be deceiving
As the minutes turn into hours on election night, Joe Biden has posted early leads in several swing states that would help clear his path toward the White House.
Donald Trump needs both Ohio and North Carolina in his column for his electoral maths to work out, but Mr Biden has modest leads in both states with more than half of all voters reported.
Democrats shouldn’t count on those margins holding up, however. As predicted, the early and mail-in votes trended toward Mr Biden, while the election-day results have favoured Mr Trump.
As more and more of those in-person votes are counted, the president will slowly, inexorably claw his way back. It’s just a question of whether there are enough votes left to count.
Meanwhile, Mr Trump leads in Virginia, but the count there always trends Republican early, until the heavily Democratic suburbs of Washington DC, report their results.
What does the exit poll data show?
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%).
Where are the candidates?
Mr Trump, who is watching the returns from the White House, is expected to address the nation later on Tuesday evening.
The president is hosting an election night party inside the presidential mansion with about 400 guests invited.
Mr Biden was at his home with family in Wilmington, Delaware, with few aides around, according to CBS.
The economy under Trump in six charts
Fact-checking the closing days of the US election
Trump is in the fight of his political life
A senior Biden adviser told CBS the Biden team “feel good”.
Earlier on Tuesday, Mr Trump, sounding a little hoarse, spoke to Fox News by phone, said he had a “really solid chance” of winning.
Asked when he would declare victory, he added: “When there’s victory. If there’s victory… there’s no reason to play games.”
People queued early in the morning to cast their ballots at polling stations in Philadelphia, Pennsylvania
A new “non-scalable” fence has been put up around the White House in Washington DC.
Businesses in the nation’s capital and also in New York City have been seen boarding up their premises due to concerns about unrest.
How will the election work?
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.
This system explains why it is possible for a candidate to win the most votes nationally – as Hillary Clinton did in 2016 – but still lose the election.
Control of the Senate is also at stake in these elections, with the Democrats seeking to gain control of both houses of Congress and the White House for the first time since early in Barack Obama’s first term.
How are Trump and Biden doing in the polls?
Coronavirus has at times overshadowed the campaign, with the pandemic in the US worsening over the final weeks.
The country has recorded more cases and more deaths than anywhere else in the world, and fear of infection has contributed to an unprecedented surge in early and postal voting.
Security fencing was erected in front of the White House ahead of voting day
The final election results don’t get certified for days or even weeks, so 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 to project a winner, they won’t – even if others are doing so.
When will we get a result?
It can take several days for every vote to be counted after any US presidential election, but it is usually pretty clear who the winner is by the early hours of the following morning.
However officials are already warning that we may have to wait longer – possibly days, even weeks – for the 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 will be 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. (BBC report)