Polls in the US election closed on Tuesday but the result has still not been determined and is likely to hinge on developments in the key states of Pennsylvania and Georgia over the coming hours.
US presidential elections have come down to a handful of votes before.
Here, we look at some very close previous finishes.
– 2000
The race between Republican George W Bush and Al Gore was affected by inconsistencies with vote tallying, especially in Florida where the Democrat called for a recount.
Legal challenges were pursued to the US Supreme Court, which rejected Mr Gore’s demand for a recount and handed the election to Mr Bush.
The Texan, son of former president George Bush, lost the popular vote to Mr Gore by about 500,000 but beat him in the electoral college by 271 votes to 266.
– 1960
John F Kennedy had to fight to secure the Democratic nomination by first beating Hubert Humphrey in the primaries and then putting paid to Lyndon B Johson at the Democratic National Convention.
A massive 68.8 million votes were cast, with the man from Massachusetts triumphing over Richard Nixon by less than 120,000 votes. The Democrat did, however, claim 303 electoral college votes to the Republican’s 219.
– 1880
Eighty years earlier, James A Garfield managed to just edge out his Democratic opponent, Winfield Scott Hancock.
The Republican did not win his party’s nomination until the 36th ballot and then had to defeat Mr Hancock, a hero of the American Civil War.
He managed to scrape home by just 7,368 popular votes but cleared his opponent easily with 214 electoral college votes to 155.
– 1876
Perhaps unsurprisingly due to the scandals around outgoing Republican president Ulysses S Grant, party colleague Rutherford B Hayes lost the popular vote by some 250,000 votes.
His opponent, New York Governor Samuel J Tilden, then won the electoral college by a single vote.
He did not become president, however, as the Democrats allowed the Congressional commission to award Mr Hayes 20 contested electoral votes in the Compromise of 1877 on the basis that he withdraw the remaining US troops protecting Republican officials in the South.