In Tuesday's midterm elections, Democrats captured control of the House of Representatives for the first time since 2010. But they lost the Senate decisively, as well as some closely-watched and hard-fought gubernatorial races. While the party had high hopes for a long-shot takeover of the Senate, the numbers just weren't there, as Democratic incumbents Bill Nelson (Florida), Heidi Heitkamp (North Dakota), Claire McCaskill (Missouri), and Joe Donnelly (Indiana) were defeated. And while Beto O'Rourke ran well ahead of Hillary Clinton (or any statewide Democrat in the last 20 years), he lost his bid to unseat Republican Sen. Ted Cruz in Texas.

The results set up a narrative battle: For Democrats who had hoped for a comprehensive defeat of the forces of Trumpism, certainly the night could have gone better. At the same time, given the headwinds of gerrymandering and partisan clustering in the House, Democrats should be thrilled with their substantial gains; they will make it much harder for Republicans to recapture control in 2020.

In the Senate, it appears that President Trump's closing-weeks gambit of ramping up fear and paranoia about illegal immigration may have succeeded in shoring up the GOP's narrow majority and rescuing gubernatorial candidates in Florida and Ohio in races that had looked like toss-ups in the lead-up to Election Day. While there was no sign of it in the early voting numbers or the closing surveys from CNN and Gallup, the GOP appears to have somewhat outperformed its polling in places like Florida, Ohio, Indiana, and Missouri for the third consecutive election cycle. If those numbers hold up, it means that pollsters are going to have to fundamentally revisit their models of turnout and the electorate in a number of states to take into account not just recent results but what might be a lasting transformation of their electorates wrought by Trump.

Beyond the House and the Senate, Democrats made significant and consequential gains, if not as many as they had hoped. In the Rust Belt, where Trump famously and unexpectedly sealed his Electoral College victory, Democrats won governorships in Wisconsin, Illinois, and Michigan, while holding on in Minnesota and Pennsylvania. Basically Republicans have been almost voted out of executive power in the Midwest. For a president whose hopes for re-election run directly through territory that was lost pretty decisively in this midterm cycle, the sudden shift in GOP fortunes in this region should be concerning. Republicans will be unable to gerrymander another decade-long death grip on the House of Representatives, and they will no longer rule states like Michigan and Wisconsin like one-party fiefdoms immune from accountability and decency.

Voters downballot also did some radical things that had nothing to do with senators or governors. The most radical move came from Florida, where voters amended the state's constitution to restore voting rights for 1.4 million former felons. If even half of those voters turn out in 2020 and break 60-40 Democratic, the party just added about 140,000 votes to its statewide totals in 2020. And that's a conservative estimate. Trump's margin in 2016 was 112,000. In other words, Florida's voters just obliterated the state's Republican lean — a change that probably would have delivered both Democrats Bill Nelson and Andrew Gillum into office last night. Too little too late for them, but a major win for the next cycle.

The Democratic conquest of the House was, nevertheless, the highest-profile victory. The new Democratic majority means there are some things from which we are now safe for the next two years: There will be no full repeal of ObamaCare, no Mitch McConnell-spearheaded assault on Social Security and Medicare, no more loosening of critical banking and finance regulations. There will be no wasteful border wall unless Trump gives up on his dreams of restricting legal immigration.

The Democratic conquest of the House is also likely to be the most consequential and problematic midterm result for the president. Most importantly, Democrats will now get to unleash the oversight power of the House on this lawless executive branch, investigating the president's business dealings, subpoenaing his taxes, holding corrupt executive branch officials like Interior Secretary Ryan Zinke accountable, and re-opening the House Intelligence investigation into Russia's ongoing interference in our election processes.

What happened last night was remarkable given the tremendous advantages with which Republicans entered this cycle. It's not just that the GOP had nearly unfettered power to legislate over the past two years, but that they started the race for the House with roughly a 5- to 7-point advantage due to the lasting effects of their post-2010 gerrymander and the clustering of Democrats in urban districts. In several pivotal states, including Michigan, Iowa, Ohio, Wisconsin, and Texas, GOP elites had an additional advantage by virtue of voter ID laws aimed at driving down Democratic turnout. Republicans held governorships and secretary of state offices in a number of critical battleground states too, which they used to disadvantage Democrats, nowhere more flagrantly than in Georgia, where outgoing Secretary of State Brian Kemp purged thousands of eligible voters and fabricated a cybercrime accusation against his opponents on election eve. Those tactics worked in some places, but they might not in the long term.

Are we just repeating history here? Will Trump, like Obama in 2012, rally his coalition after a midterm defeat, win re-election comfortably, and have congressional coattails too? The possibility can't be dismissed, but let's not forget some of the things Obama had going for him that Trump decidedly does not: First and most importantly, Obama, who began his first term with 67 percent approval in the benchmark Gallup survey, had tangible popularity with which to recover and win. Until the Benghazi tragedy in September of that election year, the Obama administration was completely free of major scandals and the economy was finally showing signs of sustained improvement after his team inherited the worst economic crisis since the Great Depression.

Trump, on the other hand, is carrying around a storage locker of self-inflicted scandals, most of which congressional Republicans have so far seen fit to ignore or wave desperately away. Obama also was not reliant on razor-thin margins in red states for his re-election in the same way that Trump will be if he wants to restage his Rust Belt miracle in 2020.

For Democrats, the loss of some of the cycle's biggest rising stars — Gillum and O'Rourke, in particular — really stings. And by bleeding out critical Senate seats, they also made their task in 2020 even tougher. The more sobering long-term prospect is that the increasingly anti-democratic and anti-majoritarian Senate may be an obstacle to progressive power for a long generation, unless the party can convince several million Californians, Chicagoans, and New Yorkers to move to Idaho, Nebraska, and North Dakota.

But party activists and candidates should be proud of the distance they traveled during Tuesday's midterms. It takes courage to fight on a field that is tilted almost hopelessly against you, and Democrats proved they have the will, the resources, and the energy to continue that struggle for another long two years.