The serving president’s party usually performs poorly during midterms. However, that doesn’t mean they always suffer a wipeout—and certain conditions could set the stage for a surprise comeback for President Joe Biden and the Democrats.

Perhaps the most obvious is the U.S. Supreme Court’s decision to overturn the landmark abortion rulings Roe v. Wade and Planned Parenthood v. Casey, which found that a woman’s right to abortion was constitutionally protected.

It remains to be seen if the Court’s ruling will affect turnout. However, if Democratic voters and women are motivated by a desire to protect abortion access, Biden’s party might just beat the odds.

The best-case scenario for Democrats would be retaining control of both the House of Representatives and the Senate—and perhaps making net gains in both chambers.

Holding the Senate

The U.S. Senate is currently divided between 50 Republicans, 48 Democrats and two independents who caucus with the Democrats. This has meant that Vice President Kamala Harris has had to use her casting vote on several occasions.

Poll tracker FiveThirtyEight’s 2022 election forecast rates the Senate as a toss-up with Democrats defending 14 seats and Republicans 21, but there is some room for Democratic gains.

The Pennsylvania Senate race is a toss-up as Republican Senator Pat Toomey is retiring. If Democratic Lt. Governor John Fetterman can defeat Republican Dr. Mehmet Oz, that will go a long way to holding the Senate.

Democrats could also make gains in potentially close races that FiveThirtyEight rates as leaning Republican—Wisconsin and North Carolina—and could even score an upset victory in Ohio.

However, incumbent Democrats in close races will also have to win re-election if the party hopes to maintain control of the Senate. FiveThirtyEight rates the races in Georgia, Nevada and Arizona as toss-ups. All those seats are currently held by Democrats.

If everything goes right for Democrats on election day, they could end up with 54 seats—still shy of the 60 votes needed to overcome the filibuster. This outcome seems unlikely, however.

Keeping the House

It’s a different picture in the House of Representatives, where Republicans are favored to win, according to FiveThirtyEight’s analysis.

Democrats currently hold 220 seats to Republicans’ 210, while five seats are vacant. The president’s party will need 218 seats to keep the chamber.

FiveThirtyEight argues that even if Democrats hold all their current seats and win all the toss-up races, it will not be enough to hand them the majority. A Democratic victory in the House appears to require a major shakeup in the dynamics of the midterm elections.

That is possible—especially given likely ongoing controversy over abortion laws and investigations into the role some Republicans played in efforts to overturn the 2020 presidential election.

The election could throw up a so-called “October surprise” that changes the course of the race in Democrats’ favor, but right now that seems a distant prospect.

It also seems unlikely that neither chamber will change hands. The last time that happened was in 1998, when Republicans held both the House and Senate despite modest Democratic gains in the House and some changes in the composition of the Senate.

It’s worth noting that at that time, Republicans’ failure to make gains was seen as a major surprise.

If Democrats can buck the trend and keep the House, it will be considered a significant victory and could see Speaker of the House Nancy Pelosi remain in the leadership amid recent speculation about her future.

Biden’s Agenda and 2024

The outcome of the November elections will have a major impact on two issues heading into 2023: whether President Biden can implement his agenda and the 2024 presidential race.

If Republicans take control of either chamber of Congress, they will be able to stymie the president’s agenda, preventing the passage of legislation and, if they control the Senate, stopping Biden from filling any vacancy that might arise on the Supreme Court.

Even narrow Democratic majorities in the House and Senate would make matters easier for the administration, while surprise victories could give Biden the legislative firepower he needs to pass stalled measures such as the $1.75 trillion Build Back Better plan.

Democrats keeping the House would also prevent Republicans launching a series of investigations into the administration - which they are reportedly already planning - and stop those potential investigations from dominating the political agenda in the run up to 2024.

Threats of impeachment against Biden from some quarters of the Republican Party would also become meaningless if Democrats retain both houses of Congress, removing another potential headache for the president.