There was a whole lot of noise in the two months between Joe Biden winning the 2020 election in Pennsylvania and the final certification of that victory in Congress in the early-morning hours Thursday.

Even before voters cast their ballots, President Donald Trump threatened to flood the state with lawyers to challenge results. And in the run-up to Election Day, it had already become one of the most litigated elections in Pennsylvania’s history. Lawsuits over the legality of mail ballot drop boxes, deadlines, and satellite elections offices flooded the courts. Trump loudly and baselessly claimed that he could only lose the state by fraud.

The attacks on the election’s legitimacy only escalated as the results came in. Trump’s refusal to concede and false allegations of fraud fueled another whirlwind of failed lawsuits and a public opinion campaign that stoked voter uncertainty.

Their complaints culminated early Thursday when Sen. Josh Hawley (R., Mo.) and dozens of House Republicans — including eight of Pennsylvania’s nine GOP congressmen — sought to disqualify Pennsylvania’s 20 electoral votes.

Their efforts were voted down just after 3 a.m. Thursday, paving the way for Congress to finalize Biden’s victory.

Here are some key events that led to that moment:

Nov. 4 — In the early morning hours after Election Day, Trump declares he has an “impossible to catch” lead over Biden in Pennsylvania, despite the fact most mail ballots have not yet been counted. Later, he falsely declares victory.

Week of Nov. 4 — In the days after the election, Trump campaign lawyers file roughly a dozen lawsuits in state and federal courts across Pennsylvania challenging issues such as the level of access monitors had to the counting of votes in Philadelphia and other locations, or seeking to disqualify batches of mail ballots for procedural defects like voters failing to write their address on the outside of the envelope. Nearly all are ultimately rejected by courts.

Nov. 7 — News organizations project Biden has won Pennsylvania and, with it, the presidency.

» READ MORE: Fact-checking false claims about Pennsylvania’s presidential election by Trump and his allies

Nov. 9 — The Trump campaign files a federal lawsuit in Williamsport, its first sweeping legal challenge seeking to block certification of Pennsylvania’s election results. The suit compiles many complaints that had already been litigated in state courts — like issues over poll monitor access to vote counting and disparities in whether counties allowed voters to correct mistakes on mail ballots. The suit is the first legal challenge to propose setting aside the results and having state legislators declare the victor instead.

Nov. 21 — U.S. District Judge Matthew Brann, a former county GOP chairman in Pennsylvania, rejects the Trump campaign’s suit after a remarkable court hearing in Williamsport, in which Trump campaign lawyer Rudy Giuliani strays from the campaign’s earlier arguments over Pennsylvania’s rules for the casting and counting of votes. Instead, he alleges a cabal of Democratic officials nationwide had conspired to steal the election. In tossing the suit, Brann describes it as a “strained legal argument” with “speculative accusations … unsupported by the evidence.” The Trump campaign appeals the decision to the U.S. Court of Appeals for the Third Circuit.

Nov. 21 — U.S. Rep. Mike Kelly (R., Pa.) files a suit before a state appellate court seeking to disqualify all votes cast by mail in the state, arguing the 2019 state law that had enabled them had been unconstitutionally approved by the GOP-controlled state Legislature.

Nov. 23 — Pennsylvania counties certify their results and send them to the Department of State. A handful of Republican county commissioners vote against certifying their results.

Nov. 24 — Pennsylvania Secretary of State Kathy Boockvar certifies the election results: 80,555 more votes for Biden than for Trump. Gov. Tom Wolf signs the Certificate of Ascertainment to name the 20 Biden electors who will represent the state in the Electoral College.

» READ MORE: With the vote count now over, here’s how Pennsylvania broke for Joe Biden

Nov. 25 — Republican state senators hold a hearing with Trump lawyers Giuliani and Jenna Ellis in Gettysburg, airing a number of false voter fraud conspiracy claims. Trump calls into the meeting. “This election was rigged, and we can’t let that happen,” he tells the crowd through a phone held up to a microphone. “We can’t let that happen for our country, and this election has to be turned around because we won Pennsylvania by a lot and we won all these swing states by a lot.” Some Republican state senators meet with Trump in the White House that night, with one abruptly leaving the meeting after testing positive for COVID-19.

Nov. 27 — The U.S. Court of Appeals for the Third Circuit upholds Brann’s rejection of the Trump campaign’s federal suit, saying the campaign did not have legal standing to challenge the administration of Pennsylvania’s election. But while it throws out the case on procedural grounds, Circuit Judge Stephanos Bibas, a Trump appointee, also addresses in his opinion the merits of the campaign’s claims of malfeasance and finds them lacking. “Calling an election unfair does not make it so,” he writes. “Charges require specific allegations and then proof. We have neither here.” Kelly vows to take the case to the U.S. Supreme Court.

Nov. 28 — The Pennsylvania Supreme Court rejects Kelly’s challenge to Pennsylvania’s vote-by-mail law. Though the justices split on whether the questions the congressman raised over the law’s constitutionality deserved further hearing, they all agree that nothing untoward occurred with votes cast in this election and reject his proposed remedy of disenfranchising millions of voters across the state. “It is not our role to lend legitimacy to such transparent and untimely efforts to subvert the will of Pennsylvania voters,” Justice David N. Wecht writes in an opinion.

Week of Nov. 30 — Trump calls Pennsylvania House Speaker Bryan Cutler twice to enlist his help in his efforts.

Dec. 4 — More than 60 Republican lawmakers in Harrisburg — including Cutler and House Majority Leader Kerry Benninghoff — disavow Pennsylvania’s election results and in a letter call on members of Congress to object during the counting of electoral votes in Washington. The missive comes just hours after Trump allies on Twitter called them “cowards” and accused them of letting America down — and hours after Cutler and Benninghoff signed a memo saying the state legislature had no authority to interfere with the certification of the state’s vote.

» READ MORE: 2020 was an ugly year in Harrisburg. Don’t expect 2021 to be much better.

Dec. 8 — The U.S. Supreme Court declines to consider Kelly’s appeal. Meanwhile, a new front in the legal battle opens. In an audacious brief riddled with factual errors, questionable legal arguments, and debunked conspiracy theories, Texas Attorney General Ken Paxton urges the high court to disqualify votes from Pennsylvania and three other battleground states, claiming “significant and unconstitutional irregularities.” Trump, 17 Republican state attorneys general, and dozens of GOP lawmakers in Harrisburg and Washington sign on in support of the suit.

Dec. 11 — The U.S. Supreme Court rejects Paxton’s case, saying in a brief, unsigned order that Texas lacked standing to challenge “the manner in which another state conducts its election.”

Dec. 14 — Pennsylvania’s electors cast the state’s 20 Electoral College votes for Biden. The Pennsylvania Republican Party announces 20 GOP electors had also met “to cast a conditional vote” for Trump. The Trump campaign says the effort was meant “to preserve any legal claims that may be presented going forward.

Dec. 21 — Trump’s campaign asks the U.S. Supreme Court to overturn several Pennsylvania Supreme Court decisions that prohibited counties from comparing mail ballot signatures to those on file, blocked campaigns and political parties from challenging ballots as they are being counted, allowed limitations on observers to the vote count in Philadelphia, and allowed ballots to count even if voters had forgotten to fill out the address or date on the envelope.

Dec. 23 — Trump invites the entire state Senate Republican caucus to lunch at the White House.

Jan. 4 — Top Republicans in the state Senate ask Congress to delay certifying Pennsylvania’s results, writing in a letter that “a majority of the State Senate is troubled by the many inconsistencies that happened in our Commonwealth during the 2020 election.”

Jan. 6 — Congress meets to count electoral votes, with a group of Republican senators and a majority of Republican members of the House planning to object to Pennsylvania’s results. Lawmakers begin debating an objection to Arizona’s results when a mob attacking the Capitol and the democratic process breaches the building, interrupting the session. Afterward, senators drop their planned objections to other states, but Hawley says he’ll still object to Pennsylvania’s results.

Jan. 7 — In the early hours, as the session continues, Hawley and Kelly object to Pennsylvania’s electoral results. The two chambers split up for debate, with the House taking a full two hours as Republican lawmakers argue for objecting to the results — making a variety of false or misleading claims about the election — while Democrats demand the results are counted. Ultimately, both the House and Senate vote against the objection, officially accepting Pennsylvania’s 20 Electoral College votes for Biden.