If the presidential election is close, chaos is likely to result. There might not even be a declared winner. Here's everything you need to know:

What could go wrong?
The coronavirus pandemic could wreak havoc at the polls, especially if November finds us in the midst of a second wave, as many infectious-disease experts predict. The potential for disaster was made evident in recent primaries: Shortages of workers, caused by fear of the coronavirus, led to shuttered and understaffed polling places, creating logjams that left voters waiting for hours in long lines to cast a ballot. That happened in Maryland, Georgia, Wisconsin, Washington, D.C., and elsewhere — and problems are expected to be far worse in November, when voter turnout will be considerably higher. "We're just going to have a catastrophe," said Michael McDonald, a political science professor at the University of Florida who studies elections.

What about mail-in ballots?
They should help ease the crush at polling places — but counting them will create new problems. It takes a long time to tally them under the best of circumstances, and many municipalities may not be prepared to deal with an unprecedented avalanche of mailed-in ballots. Again, the primaries have offered a preview: In Idaho, Maryland, and Pennsylvania, mail-in ballots were still being counted more than a week after the election date. Imagine a scenario where the outcome of the presidential election is hanging on results in Michigan and Pennsylvania, and for days after November 3 mail-in ballots in those states are still being tallied, verified — and challenged. It would create major confusion and chaos, and there's wide concern that President Trump would fan the flames.

What might Trump do?
It's highly likely that if Trump faced a potential loss he'd claim the vote was illegitimate. He has a long history of alleging voter fraud and election theft without evidence — groundlessly claiming, for example, that he'd have won the popular vote in 2016 "if you deduct the millions of people who voted illegally." He's been laying the groundwork for contesting November's results by continually claiming — again, without evidence — that mail-in voting enables massive fraud and will lead to, as he put it in a recent tweet, "the greatest Rigged Election in history." Imagine a scenario in which Michigan is the pivotal state in the Electoral College, and Trump is leading the vote there after the polls close — but over a fraught, frenzied week of counting, mail-in ballots from heavily Democratic Detroit give the race to Biden. "Trump could basically claim fraud — and we don't really have mechanisms to deal with that," said Steven Levitsky, a political science professor at Harvard and co-author of How Democracies Die. Then there's an even more unsettling possibility: that no winner is named at all.

How could that happen?
The Constitution left some ambiguities and holes in the mechanics of the Electoral College. Lawrence Douglas, a law professor at Amherst College, explains how this could lead to an electoral nightmare in a new book, Will He Go? Trump and the Looming Election Meltdown in 2020. Let's say the election comes down to a single state that's barely won by Biden, but whose state legislature is controlled by Republicans. Michigan could be such a state. The legislature could back Trump's claim that he was denied victory by fraud, and move to give him the state's electoral votes. Under another scenario, the legislature and the state's Democratic governor could send competing electoral certificates to Congress, which tallies the final Electoral College vote. It would then be up to Congress to decide which certificate was valid — and if a House controlled by one party and a Senate controlled by the other disagree, "there is basically no way to resolve the dispute," Douglas said. "There's a Chernobyl-like defect built into our system of presidential elections that really could lead to a meltdown." Regardless of the circumstances, if Trump loses a close election, it is quite possible he will insist he's the legitimate president and refuse to leave the White House.

What happens then?
Few expect he would succeed. At noon on Jan. 20, 2021, the Secret Service and the military are constitutionally mandated to shift their allegiance to the declared winner (assuming there is one). To hold on to power "would require the president to get multiple people to fairly blatantly disregard their oath to uphold the Constitution," said Georgetown law professor David Super. But militia uprisings and other civil violence aren't hard to envision. More important is the critical damage to the republic that could be inflicted by a president who broke with more than two centuries of tradition by refusing to accept his loss as valid. "Implicit in a democracy is the idea that voters accept the results as legitimate," said Richard Hasen, a law professor at the University of California, Irvine, who's written a book on the 2020 race called Election Meltdown. "If you don't have that, then you don't have a democracy."

If the Electoral College vote is tied
There's another scenario that could throw the 2020 election (or any election) into high drama: a 269-269 Electoral College tie. In that unlikely but not impossible eventuality, the race is decided in the House — not the current version, but the one newly installed by the election. Since it is likely Democrats will maintain House control, you might figure this mechanism would benefit Biden, but that's not the case: The House's decision does not come from a straight vote by each member. Instead, each state delegation casts a single vote — so Wyoming's sole representative has the same say as California's 53. And while Democrats currently hold a majority of seats, Republicans hold more delegations, by 26 to 23 (Pennsylvania's is currently tied). If that ratio stands, the House could reinstall Trump even if the Democrats hold a sizable majority. In that circumstance, the president could lose the popular vote and his party could be beaten in the House — and yet he'd still be reanointed president. That outcome would be "among the most egregious violations of democratic principles imaginable," said George Edwards III, a retired political science professor at Texas A&M and author of Why the Electoral College Is Bad for America. "There's simply no principle that can justify it."

This article was first published in the latest issue of The Week magazine. If you want to read more like it, you can try six risk-free issues of the magazine here.