Despite incomplete results from several battleground states that could determine the outcome of the US presidential race, President Donald Trump proclaimed victory over Democratic challenger Joe Biden on Wednesday.
The premature move confirmed worries Democrats had voiced for weeks that Trump would seek to dispute the election results. That could set off any number of legal and political dramas in which the presidency could be determined by some combination of the courts, state politicians and Congress.
Here are the various ways the election can be contested:
Early voting data shows Democrats are voting by mail in far greater numbers than Republicans. In states such as Pennsylvania and Wisconsin that do not count mail-in ballots until Election Day, initial results appeared to favor Trump because they were slower to count mailed ballots. Democrats had expressed concern that Trump would, as he did on Wednesday, declare victory before those ballots could be fully tallied.
A close election could result in litigation over voting and ballot-counting procedures in battleground states. Cases filed in individual states could eventually reach the US Supreme Court, as Florida's election did in 2000, when Republican George W. Bush prevailed over Democrat Al Gore by just 537 votes in Florida after the high court halted a recount.
Trump appointed Amy Coney Barrett as Supreme Court justice just days before the election, creating a 6-3 conservative majority that could favor the president if the courts weigh in on a contested election.
"We want the law to be used in a proper manner. So we'll be going to the US Supreme Court. We want all voting to stop," Trump said on Wednesday, even though election laws in US states require all votes to be counted, and many states routinely take days to finish counting legal ballots.
The US president is not elected by a majority of the popular vote. Under the Constitution, the candidate who wins the majority of 538 electors, known as the Electoral College, becomes the next president. In 2016, Trump lost the national popular vote to Democrat Hillary Clinton but secured 304 electoral votes to her 227.
The candidate who wins each state's popular vote typically earns that state's electors. This year, the electors meet on Dec. 14 to cast votes. Both chambers of Congress will meet on Jan. 6 to count the votes and name the winner.
Normally, governors certify the results in their respective states and share the information with Congress.
But some academics have outlined a scenario in which the governor and the legislature in a closely contested state submit two different election results. Battleground states of Pennsylvania, Michigan, Wisconsin and North Carolina all have Democratic governors and Republican-controlled legislatures.
According to legal experts, it is unclear in this scenario whether Congress should accept the governor's electoral slate or not count the state's electoral votes at all.
While most experts view the scenario as unlikely, there is historical precedent. The Republican-controlled Florida legislature considered submitting its own electors in 2000 before the Supreme Court ended the contest between Bush and Gore. In 1876, three states appointed "dueling electors," prompting Congress to pass the Electoral Count Act (ECA) in 1887.
Under the act, each chamber of Congress would separately decide which slate of "dueling electors" to accept. As of now, Republicans hold the Senate while Democrats control the House of Representatives, but the electoral count is conducted by the new Congress, which will be sworn in on Jan. 3.
If the two chambers disagree, it's not entirely clear what would happen.
The act says that the electors approved by each state's "executive" should prevail. Many scholars interpret that as a state's governor, but others reject that argument. The law has never been tested or interpreted by the courts.
Ned Foley, a law professor at Ohio State University, called the ECA's wording "virtually impenetrable" in a 2019 paper exploring the possibility of an Electoral College dispute.
Another unlikely possibility is that Trump's Vice President Mike Pence, in his role as Senate president, could try to throw out a state's disputed electoral votes entirely if the two chambers cannot agree, according to Foley's analysis.
In that case, the Electoral College Act does not make clear whether a candidate would still need 270 votes, a majority of the total, or could prevail with a majority of the remaining electoral votes - for example, 260 of the 518 votes that would be left if Pennsylvania's electors were invalidated.
"It is fair to say that none of these laws has been stress-tested before," Benjamin Ginsberg, a lawyer who represented the Bush campaign during the 2000 dispute, told reporters in a conference call on Oct. 20.
The parties could ask the Supreme Court to resolve any congressional stalemate, but it's not certain the court would be willing to adjudicate how Congress should count electoral votes.
A determination that neither candidate has secured a majority of electoral votes would trigger a "contingent election" under the 12th Amendment of the Constitution. That means the House of Representatives chooses the next president, while the Senate selects the vice president.
Each state delegation in the House gets a single vote. As of now, Republicans control 26 of the 50 state delegations, while Democrats have 22; one is split evenly and another has seven Democrats, six Republicans and a Libertarian.
A contingent election also takes place in the event of a 269-269 tie after the election; there are several plausible paths to a deadlock in 2020.
Any election dispute in Congress would play out ahead of a strict deadline - Jan. 20, when the Constitution mandates that the term of the current president ends.
Under the Presidential Succession Act, if Congress still has not declared a presidential or vice presidential winner by then, the Speaker of the House would serve as acting president. Nancy Pelosi, a Democrat from California, is the current speaker.