Thirty-six hours after election night, the results suggest that Joe Biden will win both the popular vote and the electoral college. That said, those 36 hours have been a journey, from losing Florida to having hopes dashed in Ohio and Texas, to Biden starting out way behind in the Rust Belt states.

What is striking about the past 36 hours is not just this narrative, but the other one: Despite a pandemic, despite a highly polarized electorate, a record number of people voted without incident.

Indeed, if one considers not just the mechanics of the election, but also the way the news media and others have framed the election, one begins to see a foreseen disaster that was averted through considerable effort by the relevant gatekeepers.

In the weeks and months before Election Day, there were widespread concerns about how everything could go wrong. There was talk about Trump supporters engaging in voter intimidation. Cities were boarded up due to fears of violence. Numerous lawsuits were anticipated. And President Trump telegraphed that he would probably declare victory even though he had not actually won a sufficient number of states.

Last week, in a tweetstorm, my friend and colleague Jacob T. Levy foresaw the upside of all these warnings. He suggested that the 2020 election had many parallels to the Y2K event: Because it was a predictable disaster, it could be avoided. As Levy noted, “So many institutions (pollsters, TV network decision desks, state election departments, etc.) have so thoroughly gamed out and prepared for so many outcomes ranging from weird to catastrophic that it all turns out surprisingly smooth and straightforward.”

Y2K20 did not crash the system for a variety of reasons. Let’s start with the actual voting. A record number of people voted in Tuesday’s election, and the percent of turnout was the highest it had been since 1908. This is extraordinary given that it happened during a pandemic. The huge number of early votes made this possible. As a Massachusetts poll inspector on Tuesday, I noticed that same-day turnout was light compared with a normal general election, but it vastly exceeded expectations given that 61 percent of my city’s registered voters had cast their ballots early. This appears to have been indicative of the entire country.

Despite the record number of voters, the New York Times reported that “voting for a vast majority of Americans proceeded smoothly on Tuesday, with … few major problems.” CNN reported that everything went well in the battleground states: “In Michigan, Secretary of State Jocelyn Benson said Tuesday that ‘precincts are islands of calm.’ In Florida, the spokesman for the Broward County supervisor of elections said the day was ‘boring.’” And NBC News reported that Department of Homeland Security officials did not detect any hacking. “Despite fears of the threat of intimidation or even violence around polling places, watchdog groups like Common Cause said it had seen no major reports of either.” Yea, no hacking!

Not everything went smoothly. The U.S. Postal Service appears to have ignored a court order. Ex-felons in Florida were supposed to be enfranchised based on a referendum from two years ago, but Florida Republicans were having none of that. Still, contrary to fears, the election was free and fair — even according to international election observers.

Those same observers were harsh in their judgment about Trump attempting to prematurely declare victory early Wednesday. Here, however, the news media and social media networks framed Trump’s efforts as they should have. None of the major networks, including Fox News, gave Trump’s claims any credence. Even Fox News’s legal guests criticized the president’s statements.

Similarly, Trump’s efforts to tweet about wins in states where votes were still being counted did not really work:

The media also framed the state-by-state election returns pretty well given the surprises compared with polling expectations. They stressed that early Biden leads in some states were due to mail-in votes being released first, whereas in the Rust Belt trio, Trump’s initial leads were expected to be ephemeral because of the huge advantage of mail-in votes for Biden.

It is also worth noting that senior GOP officials clearly expected Trump to act out like this and refused to play along. Even toadies like Chris Christie and Sen. Marco Rubio (R-Fla.) criticized the Trump campaign’s “Stop the vote!” nonsense.

It’s unlikely that the American people will buy Trump’s malarkey, either. As the Election Integrity Project’s Rosa Brooks noted in this newspaper, Americans are more sophisticated about the process of voting and vote-counting than in the spring: “Today, there is far less reason to fear a catastrophic political outcome than there was in June, for the simple reason that the many efforts to ring warning bells about Trump’s likely efforts to undermine the election results were successful.”

Clearly the 2020 election results surprised and disappointed many observers. In other cases, it simply reconfirmed their priors. However, it is worth stressing how many of the worst-case scenarios did not pan out. This is not because fears were misplaced. It is because election administrators, elected officials not including the president, and media organizations gamed out what to do — and did it well.