Doug Jones’s shocking upset victory in Alabama — Fox News and the Associated Press have both called the race for him — has an enormous upside for Democrats. It gives them their first realistic chance of retaking the US Senate in 2018. And if they manage to pull that off, the consequences for the future of Donald Trump’s presidency will be enormous.

Once Jones is sworn in, the 52-48 Republican majority will shrink to just 51-49. This means that Democrats will have to gain, on net, just two seats, rather than three, to retake control of the chamber.

It might not seem like this makes much of a difference, but it’s an enormous help for Democrats — because they face such a horrifically bad Senate map in 2018.

Democrats have to defend a massive 26 Senate seats next year, while a mere eight Republican seats are up. And in addition to having fewer targets to aim at, Democrats are on defense in difficult territory — they’re defending 10 seats in states Trump won. (Five of those are in states Trump won overwhelmingly.)

Furthermore, of those eight Republican-held seats on the ballot, just one is in a state Hillary Clinton won (Dean Heller in Nevada). There’s also an open seat in Arizona, a state where Clinton came relatively close to winning. But the other six GOP-held seats are in deep-red territory.

With both of those points in mind, it’s been very difficult to plot a plausible path to a three-seat Democratic gain. The party would have had to pull off the very challenging task of holding on to all of their own seats, and they’d probably have to win the GOP-held seats in Nevada and Arizona, and then ... they’d need one more. (Beating Ted Cruz in Texas or winning an open Tennessee seat are two possibilities, but both are long shots.)

Jones’s win changes this math. Now, defending all their incumbents plus winning just Nevada and Arizona would give Democrats a 51-49 majority in the Senate. That’s still a very heavy lift — but it’s the most plausible the party’s chances have looked all year.

(A note: For simplicity, this map portrays Maine and Vermont among the Democratic-held seats, since independent Sens. Angus King and Bernie Sanders do caucus with Democrats. Also, note that Sen. Al Franken says he plans to resign, meaning two Minnesota seats will be on the ballot for Democrats next fall.)

Senate control would finally let Democrats block Trump’s nominees

Republicans’ loss of either house of Congress would be a seismic defeat for President Trump. It would ensure that the GOP couldn’t pass any more major partisan bills through the budget reconciliation process, and it would give Democrats subpoena power that they’d surely use to launch vigorous investigations of the administration.

But a turnover in Senate control would have another major consequence — it would give Democrats veto power over Trump’s nominees.

Unlike the vast majority of legislation, which needs 60 votes to overcome a Senate filibuster, Trump can get any nominee through the chamber with a simple majority — meaning he’s gotten a plethora of nominees confirmed without any Democratic support.

Under a Democrat-controlled Senate, that would no longer be possible. And it’s not just that Trump would need to pick off at least one Democrat to win any confirmation vote (though that’s true). The much more consequential result would be that Chuck Schumer would decide on the calendar for considering and confirming nominees — which would let him bury many of Trump’s picks indefinitely.

This would be most important of all for the narrowly divided Supreme Court. Democrats have long feared that a vacancy in a liberal or swing seat could arise while Republicans controlled the presidency and Senate, because their nominee could serve for life and reshape American jurisprudence for decades.

But if Democrats retook the Senate, they could simply refuse to consider any Trump nominee for the seat — as Republicans did for Merrick Garland in 2016. Lifetime appointments to lower federal courts, something the Senate has been moving quickly on under Trump and McConnell, would also surely slow to a crawl.

Finally, Trump appointments to Cabinet positions and other executive branch positions would also have to win Democrats’ approval if the party controlled the Senate. This would mean not only that Democrats could block nominees they consider extreme or unqualified, but also that they could prevent Trump from appointing sycophants to key federal law enforcement posts.

A Democratic-controlled Senate could do an enormous amount to hamstring President Trump in his third and fourth years in office. And Doug Jones’s win has made that possibility — once absurdly unrealistic — finally look plausible.