All of us need to start preparing for a deeply worrying scenario on Nov. 3. It is not some outlandish fantasy, but rather the most likely course of events based on what we know today. On election night, President Trump will be ahead significantly in a majority of states, including in the swing states that will decide the outcome. Over the next few days, mail-in ballots will be counted, and the numbers could shift in Joe Biden’s favor. But will Trump accept that outcome? Will the United States?

First, an explanation of why this is the most likely situation. Several surveys have found that, because of the pandemic, in-person and mail-in ballots will show a huge partisan divide. In one poll, 87 percent of Trump voters said they preferred to vote in person, compared with 47 percent of Biden voters. In another, by the Democratic data firm Hawkfish, 69 percent of Biden voters said they planned to vote by mail, while only 19 percent of Trump voters said the same. The firm modeled various scenarios and found that, based on recent polling, if just 15 percent of mail-in ballots are counted on election night, Trump would appear to have 408 electoral votes compared with Biden’s 130. But four days later, assuming 75 percent of the mail-in ballots are counted, the lead could flip to Biden, and after all ballots are counted, Biden would have 334 electoral votes to Trump’s 204.

You don’t have to believe in models to understand that this is a likely scenario. As David Graham writes in an Atlantic essay, on the night of the 2018 midterm elections, the results seemed very disappointing for Democrats. They appeared to have gained far fewer seats in the House and Senate than the polls predicted, a replay of 2016.

Except that as provisional ballots and mail-in ballots were counted, the results changed. “California just defies logic to me,” said Paul D. Ryan (R-Wis.), who was then speaker of the House. “We were only down 26 seats the night of the election, and three weeks later we lost basically every contested California race.” In fact, there are perfectly logical explanations for this “blue shift,” as scholars Edward Foley and Charles Stewart call it. But it’s easy to make it look suspicious.

After the 2018 midterms, Trump declared that a conspiracy was at work. In Florida, when Democrats started narrowing the gaps in two key races, he tweeted that “large numbers of new ballots showed up out of nowhere, and many ballots are missing or forged. An honest vote count is no longer possible — ballots massively infected. Must go with Election Night!” Imagine what Trump is likely to do this November, when his own fate hangs in the balance.

Dan Baer of the Carnegie Endowment for International Peace outlines a frightening and utterly plausible scenario in an excellent article, “How Trump could refuse to go.” Baer imagines close contests in Arizona and Florida, where Republican-controlled governments could argue that the election was marred by irregularities and change the law to allow themselves to appoint the Republican slate of electors.

In Wisconsin, where state government is divided, Baer imagines the following sequence of events: “The Republican-controlled legislature also moves to change the manner of designating electors, and to approve those pledged to Trump. However, the Democratic Governor, invoking Wisconsin state law, signs and affixes the state seal to the slate of electors for Joe Biden as certified by the state elections commission.” In Baer’s vision, Trump mobilizes his base to go out and protest, tweeting, “thank you Wisconsin! don’t let your governor rob YOUR PRESIDENT!”

Is there a way out of this national nightmare? Two powerful forces could ensure that the United States, already tarnished by its handling of covid-19, does not also end up as the poster child for dysfunctional democracy. The first is the media. We have to abandon the notion of election night and prepare the public for election month. In fact, states have never certified winners on election night. News organizations do that on the basis of statistical projections. It is time to educate the public to wait for the ballots to be counted.

The second and decisive force will be Chief Justice John G. Roberts Jr. If this type of scenario unfolds, it will end up in court. Ordinarily, this would not get to the Supreme Court. The Constitution is crystal clear that it is the states, and the states alone, that get to determine their electors. But the Supreme Court abandoned its restraint in 2000 with Bush v. Gore. That means a disputed election could quickly move up to the Supreme Court, where Roberts would be pivotal as both chief justice and the swing vote. So it might come down to this: One man will have the power to end a looming catastrophe and save American democracy.

Read more: