Washington CNN  — 

It was the nightmare scenario everyone saw coming: a nail-biter presidential election that was too close to call on election night, with the entire world forced to patiently wait on slow results from Pennsylvania as it sifted through millions of mail-in ballots.

President Donald Trump held Florida and Ohio, which quickly reported their mail-in results on election night. By the next afternoon, Democratic nominee Joe Biden had flipped Michigan and Wisconsin. But for four arduous days, the outcome of the 2020 election lingered in purgatory.

All eyes fell on Pennsylvania, with millions of still-uncounted votes. The delay was largely caused by Republican state lawmakers who defied local officials and nonpartisan experts, and refused to let counties process mail ballots before Election Day, as is allowed in other states.

So the election went into overtime. As the days crept by, Trump’s massive election night lead of 700,000 votes slowly disappeared as Pennsylvania’s 67 counties churned through their mail-in ballots, revealing a narrow win for Biden. This predictable shift gave rise to a bevy of conspiracy theories, disinformation and baseless accusations of voter fraud, stoked chiefly by the President.

Biden’s victory in Pennsylvania has now eclipsed Trump’s winning margin from 2016. If mail ballots had been counted first – not last – the trajectory of the entire election would’ve looked different.

“If they would’ve just given us 48 hours to open envelopes and stack absentee ballots, we would’ve delivered a result on election night – easy,” Pennsylvania Lt. Gov. John Fetterman, a Democrat, told CNN. “Why wouldn’t they agree to something so perfunctory and bureaucratic? Because every Republican in that food chain wanted chaos, and that’s exactly what they got.”

Zero-sum politics

The editorial board of the Bucks County Courier-Times, based in the liberal-leaning Philadelphia suburbs, saw the writing on the wall and issued a desperate plea back in September. “We’re staring into the teeth of what could be an Election Day fiasco in Pennsylvania and the people we sent to Harrisburg appear to be too busy playing politics to do much about it,” the paper wrote.

The editorial urged the GOP-controlled Legislature and the Democratic governor to compromise on an election bill that would allow counties to start processing absentee ballots three days before Election Day. Gov. Tom Wolf asked for three weeks, but Republicans offered three days.

MAP: See 2020 election results

This is not supposed to be controversial. Indeed, Republican-run states like Ohio and Florida allow weeks of pre-canvassing, which made it possible for them to quickly report large batches of votes after the polls closed. The networks projected both states for Trump on election night.

Pennsylvania Republicans crafted a bill but added “poison pill” provisions that would have essentially banned ballot drop boxes and repealed an old law that said poll watchers must live in the counties where they are observing the voting. (Democrats say this requirement is a bulwark against GOP intimidation efforts against voters of color in Philadelphia and other urban areas.)

Wolf said he was willing to negotiate on the poll watchers, but drew a hard line on drop boxes. GOP leaders said they were put off by Wolf’s veto threats and had lost confidence in Secretary of State Kathy Boockvar, a Democrat who secured some election changes through the courts.

Democratic officials, election experts and voting rights activists urged the Legislature to pass a “clean” bill that simply allowed counties to start processing ballots before Election Day. But the state House passed the GOP-backed bill in September on a 112-90 vote. Only four Democrats voted for it and one Republican opposed it. The state Senate let it languish – and that was that.

A spokesman for the House GOP caucus, Jason Gottesman, told CNN that the chamber “took the issue of election security and pre-canvassing seriously and did our job by passing a bill to address these issues, a bill that passed with Democrat support.” He blamed Wolf for the bill’s demise, saying, “It was the governor who walked away from getting this across the finish line.”

Wolf said he offered “real concessions,” but blamed Republicans for refusing to compromise.

Projecting a winner

Nearly 57 million Americans watched the results pouring in on election night, according to Nielsen ratings, and there was record-breaking engagement on many news websites.

But what people saw that night didn’t tell the full story. Predictions of a “red mirage” came true: When people went to bed on election night, Trump had a 15-point lead in Pennsylvania, buoyed by strong Election Day turnout, while millions of Biden-friendly mail ballots hadn’t been counted.

Journalists tried to explain what was going on and urged patience. But Trump declared victory and started pushing debunked lies about widespread fraud, and falsely claimed that votes for Biden had been “magically” manufactured in the middle of the night. The truth was that many of those Biden votes were among the earliest to have been cast, yet were among the last to get counted.

“The data you have, and the order you have it, enables you to make a projection,” said Drew McCoy, president of the nonpartisan election-calling website Decision Desk HQ. “In the end, the numbers would’ve been the same in Pennsylvania, but we would’ve known them in a different order. Once the votes have been cast, the election is there. It’s just a matter of discovering it.”

Biden took the lead in Pennsylvania on the morning of November 6. Later that day, Decision Desk HQ called the race for him, one day before major news outlets like CNN issued their projections.

Indeed, before the networks called the presidency for Biden on November 7, political data analysts like FiveThirtyEight’s Nate Silver and Dave Wasserman of The Cook Political Report openly mused about the fact that Biden was assured to win Pennsylvania, and thus, the election.

“All the fomented chaos couldn’t overcome the math,” said Fetterman, the lieutenant governor.

Disinformation fills the void

Throughout the seven days after Election Day, there were more than 14 million mentions of “voter fraud” and other election-related conspiracy theories across social media, television and online outlets, according to Zignal Labs, a media insights company that tracks disinformation.

Phrase like “stop the steal” and “rig the election” drove the online conversation, according to the data. Many of these inane conspiracies were promoted by Trump and his campaign. Trump was repeatedly fact-checked and censored by Twitter for undermining the integrity of the election.

Even while news networks streamed live footage from vote-counting centers in Philadelphia, Trump spread false claims that his poll watchers were being systematically sidelined in the city. In court, his lawyers were forced to admit that their poll watchers were, in fact, in the room.

Things were already tense in Philadelphia after the police killing of Walter Wallace Jr., a Black man. Now city officials were getting menacing voice mails and bomb threats over the election. But even as the disinformation was debunked, the false narrative was propelled forward.

“This was all very deliberate on the Republicans’ part, and it should not be forgotten,” said Philadelphia City Council member Helen Gym, a rising figure in the city’s progressive politics. “This is municipal government at work, and these are normal government workers. But now we’re worried about threats. It’s appalling. Republicans and Democrats alike were threatened.”

‘A vicious cycle’

A growing chorus of election experts and constitutional scholars have concluded that to prevent a repeat of 2020, Congress needs to step in and set national standards for election procedures.

In theory, the partisan squabbles that dominated the run-up to the election in Pennsylvania could’ve been prevented or minimized if there were federal laws governing deadlines for mail-in ballots, security around drop boxes, and what counties can do to process ballots ahead of time.

Rick Pildes, a CNN contributor who’s a law professor at New York University, recently wrote that the federalism at the heart of American elections has become more of a liability than a strength. He said federal voting legislation is needed to “adapt to the reality of the political culture within which we now exist,” which is a culture overrun by partisanship, distrust and disinformation.

At least two Republicans, Sens. Pat Toomey of Pennsylvania and Josh Hawley of Missouri, now say states should be allowed to process absentee ballots much earlier. Experts are hoping that with a Biden presidency and a likely GOP-run Senate, there could be room for compromise.

“We face a vicious cycle,” said Larry Diamond, a democracy expert at the conservative Hoover Institution. “We need to reform and improve our voting procedures precisely because distrust and disinformation are so rampant. But it’s hard to get agreement on these reforms because of the partisan polarization that distrust, disinformation and irresponsible politics are fomenting.”

CNN’s Kelly Mena, Hannah Rabinowitz and Caroline Tounget contributed to this report.