The US election in 2000 might provide some insight into what will now happen in this year's contentious battle between Donald Trump and Joe Biden. Photo / AP
The last time the United States experienced quite such a close and controversial election was the 2000 race between Democrat Al Gore and Republican George W Bush, when the result hung in the balance for weeks and eventually reached the Supreme Court.
Donald Trump predicted that this year's polls would also end up contested in America's top court.
The huge surge in mail-in ballots due to the pandemic has some state officials warning their results may not be called for days, making disputes and legal challenges more likely.
So what lessons can be learnt from the fallout 20 years ago as America braces itself for a potentially chaotic few days or even weeks?
In 2000, the election ultimately came down to Florida. On the night, the cable news channels called Florida for Gore, putting victory in his grasp. But then, as the count continued, they backtracked. Things were looking closer than expected. The state was returned to "too close to call".
Then it was called for Bush. "What the networks giveth, the networks taketh away," Tom Brokaw, the NBC anchor, said famously while live on air. This time networks were expected to play it far more conservative, wary of causing chaos with premature calls.
When the networks eventually called Florida for Bush, Gore initially telephoned his rival to concede. Behind the scenes, however, the Gore campaign in Florida was going ballistic. They believed the networks had jumped the gun by giving the state to Bush before the count was complete.
So Gore called Bush again - to withdraw his concession. The yes-no concession meant he was dubbed a sore loser. That framing stuck throughout the court battle to come. That's why Hillary Clinton, to much criticism, cautioned Biden against conceding prematurely regardless of how things looked on election night.
3. What makes a vote?
In America, there are myriad different ballots for different parts of the country. In the 2000 election, Bush was found to have won Florida by just a few hundred votes.
Immediately, the focus fell on those ballots that were discarded and potentially cast incorrectly. Chads, the paper circles punched out of a ballot to mark a vote, were a major bone of contention.
The 2000 result rested on whether ballots where chads were not entirely removed - hanging or dimpled chads - should be voided. Such details could matter again in a very close race.
4. Power of local officials
One of the idiosyncrasies of US elections is that rules are mostly decided at a state or even a county level. In 2000, the Gore campaign demanded recounts in a small number of Florida counties, with the relevant local boards in charge of checking the votes.
There were countless critical choices to be made. How many votes should they count? How quickly? How should they decide what was a valid vote? Keep an old standard or adopt a new one?
The coming weeks could see little-known election officials suddenly have a large amount of power.
The Bush team's attempt to stop the recounts rose up from a local court to the Florida state court and then to the Supreme Court. Its justices eventually voted 5-4 in favour of Bush.
All five justices that approved that move had been appointed by Republican presidents. Depending on the kind of legal challenge weighed up by the Supreme Court, Trump could be well positioned to succeed. He filled three seats on the nine-person Supreme Court during his first term, creating a conservative majority of 6-3.
6. It ends when someone gives up
The Supreme Court decision came a little over a month after election day, but Gore could have continued to challenge the result in other ways - refusing to accept the decision and taking his case to the people somehow.
But he did not. He conceded - against the pleas of some aides - announcing he had called Bush and joking that this time he would not be taking it back.