Democrat Joe Biden has been declared president-elect, but Donald Trump is challenging the result in some key states, alleging electoral fraud.
The president has been dealt a series of legal blows, as time runs out for him overturn the results.
Here's what we know so far.
Electors from each state meet on 14 December to formally nominate the next president.
Realistically, this is the point at which the window closes for legal challenges, although there are remote scenarios where cases could continue beyond this date.
Mr Biden is projected to have won here.
The Trump campaign is seeking to block the certification of the results in the state, alleging unfair voting practises.
President Trump's legal team say voters in Democrat-leaning areas were given more of an opportunity to correct any mistakes on their postal ballots - but on 21 November a judge in Pennsylvania rejected their case, saying it presented "strained legal arguments without merit".
On 22 November, Trump's team confirmed they were appealing against the decision.
In the lawsuit, they also allege more than 680,000 postal ballots were counted without proper oversight from poll watchers.
Poll watchers are people who observe the counting of votes, with the aim of ensuring transparency. They are allowed in most states as long as they are registered before election day.
In some areas this year, restrictions were put in place before election day, in part due to coronavirus. There were also capacity limits to avoid intimidation.
A 20-foot (six-metre) perimeter was set in the Philadelphia counting facility but this was challenged by the Trump campaign on 4 November. A court ruling on 5 November said it should be reduced to six feet - as long as poll watchers stuck to Covid-19 rules.
On the same day, the Trump campaign accused election officials of violating the judge's order, and filed a federal lawsuit to stop the count in Philadelphia, which was rejected.
Election officials insist they acted properly and appealed to the Pennsylvania Supreme Court, which on 17 November ruled officials in Philadelphia didn't violate state law when restricting how close poll watchers could stand to the processing of postal ballots.
Another challenge centres on the state's decision to count ballots that were postmarked by election day, but arrived up to three days later.
Republicans appealed this, saying that all postal ballots received after election day should be disqualified. On 12 November, the US Court of Appeals rejected the case, but the Supreme Court could still hear the Republicans' appeal.
Pennsylvania state officials estimate that about 10,000 ballots were received in the three days after election day. They say these ballots are being kept on one side, in the light of on-going legal challenges.
Counting of other votes is continuing, with the election tally on 22 November showing Mr Biden more than 80,000 votes ahead of President Trump.
On 13 November, courts rejected a string of challenges by the Trump campaign based on almost 9,000 postal ballots they said lacked information, such as the date the ballot was cast or the voter's address.
The Trump campaign has had a small victory over how long voters should be given to provide proof of identification if it was missing or unclear on their postal ballots. The deadline was 12 November, but this has been reduced by three days.
Mr Trump won the state in 2016 by his slimmest margin - just over 10,700 votes - and Mr Biden is projected as the winner here in 2020.
A lawsuit filed on 9 November in Michigan looked to block the certification of results in Wayne County, citing further complaints from poll watchers. This was rejected on 13 November.
On 11 November, the Trump campaign filed a federal lawsuit which largely repeats the claims made above - but has since dropped the challenge.
The results have now been certified at county level, and state election officials meet on the 23 November to confirm the final election results in Michigan.
Mr Biden is the projected winner here - the results will be certified by state election officials on 24 November.
On 17 November, President Trump's legal team filed a lawsuit, asking that Trump be named the winner in Nevada or that the results be void with no winner certified.
The suit claims "fraud and abuse renders the purported results of the Nevada election illegitimate" - with Trump's legal team alleging 15,000 people who lived out of state illegally voted, without providing evidence.
Similar claims were made in early November when the president's legal team produced a list of people it said had moved out of state, but still voted.
But many of these were by legal voters who were soldiers and their spouses stationed elsewhere.
Military personnel, as well as students, from Nevada - living elsewhere - can still vote. People who leave the state within 30 days before an election can also vote.
The Trump campaign filed a lawsuit in Arizona on 7 November, claiming some legal votes were rejected.
The case cites declarations by some poll watchers and two voters who claim they had problems with voting machines.
But Arizona's Secretary of State said this was "grasping at straws", and on 13 November Trump's team dropped the suit.
A lawsuit was filed in Georgia's Chatham County to pause the count on 4 November, alleging problems with ballot processing.
Georgia Republican chairman David Shafer tweeted that party observers saw a woman "mix over 50 ballots into the stack of uncounted absentee ballots".
On 5 November, a judge dismissed this lawsuit, saying there was "no evidence" of improper ballot mixing.
Could it reach the Supreme Court?
On 4 November, Mr Trump claimed voting fraud - without providing evidence - and said: "We'll be going to the US Supreme Court".
If the election result is challenged, it would usually first require legal teams to challenge it in the state courts - but the US attorney general has allowed federal prosecutors to probe the allegations.
State judges would then need to uphold the challenge and order a recount.
The Supreme Court could then be asked be asked to weigh in.
Columbia University Law School professor Richard Briffault says: "There's no standard process for bringing election disputes to the Supreme Court. It's very unusual and it would have to involve a very significant issue."
To date, the 2000 election is the only one to be decided by the US Supreme Court.
In 2000, Democrat Al Gore lost Florida state - and the presidential election - by 537 votes out of a total of almost six million cast in the state.
This was followed by a highly controversial recount process that lasted over a month - until the Supreme Court ruled to stop recounting and in favour of Republican George W Bush, who became president.
Additional reporting by Ritu Prasad