When I arrived at the Minnesota Republican Party's election-night headquarters on Tuesday night, I found a festive, crowded celebration.

Five hours later, I left a lightly attended wake.

Despite some important gains in the Senate, that was largely the story for Republicans nationwide, especially in the states that gave President Trump a surprise win two years ago — and that should have the GOP very, very concerned about 2020.

After a near-miss by Trump in Minnesota two years ago, the party believed it had momentum to return to competitiveness again. Instead, Republicans lost across the board, including control of the state House. Even in the contest that looked the most promising — the attorney general race against Keith Ellison, dogged by domestic-violence allegations — Democrats won by four points. They won the governor's race by 12 points, and a special election to fill the remainder of Al Franken's Senate term by 11. While Republicans did turn out better than four years earlier, increasing Jeff Johnson's gubernatorial tally by 200,000 votes, Democrats turned out even more. Tim Walz added over 300,000 votes to Mark Dayton's 2014 re-election bid.

Republicans didn't get entirely skunked in Minnesota. They picked up a congressional district in northern Minnesota where mining remains a key industry, and another in the rural south, both of which went solidly for Trump in 2016. However, they failed to convert another district where Trump won big two years ago, and also lost two Twin Cities suburban districts that had been trending Democratic over the last several years. The big Democratic turnout reverted the state to where it had been before Trump — a Democratic stronghold.

Nor was this the only state that reverted back to its political identity. Trump won the presidency by winning the so-called "blue wall" states: Wisconsin, Michigan, and Pennsylvania. Democrats had good nights in all three, winning gubernatorial, Senate, and congressional races in each. Gov. Scott Walker narrowly lost his bid for a third term in Wisconsin three years after running for president, even though he got more votes than four years ago while winning the state by five points. But it wasn't enough to top Democrat Tony Evers.

In Michigan, the turnout issue was even more pronounced. Republican Bill Schuette got 1.8 million votes for his gubernatorial bid, 300,000 more than Rick Snyder won four years ago — but fell more than 400,000 short of Democrat Gretchen Whitmer. Gov. Tom Wolf won re-election in Pennsylvania with 2.8 million votes, almost a million more votes than he got four years earlier in beating then-incumbent Republican Tom Corbett.

In all these states, Republicans did better than four years earlier, but Democrats got fired up as well. This points to a key weakness that many forget about Trump's 2016 win, especially in the blue-wall states. Trump didn't win by turning out a new segment of disaffected voters as much as Hillary Clinton lost by failing to turn out Democrats.

In 2016, Clinton won 1.37 million Minnesota votes. Barack Obama had won 1.55 million four years earlier. Trump only added 2,000 to Mitt Romney's 2012 total, hardly much motion at all. But that was enough for Trump to come closer than any Republican since Ronald Reagan to winning the state. However, he did it by standing still as Clinton underperformed. When Democrats show up to vote, Minnesota reverts back to its blue-state identity.

The same formula holds in the other three "blue wall" states. In Wisconsin, both Clinton (-238,000) and Trump (-5,000) underperfomed 2012's results. Clinton dropped almost 300,000 votes from Obama's 2012 performance in Michigan, which produced 131,000 fewer votes between the two major-party candidates than in the previous cycle. Pennsylvania is alone in having a higher combined 2016 vote total over 2012, but Clinton still came up short of Obama's performance in the earlier cycle by 64,000 votes — and lost the state by 44,000.

That's not to say that Trump had no effect on voters, either in the midterms or in the 2016 election. The two House pickups in rural Minnesota were in significant part inspired by Trump, and the GOP's better Senate results were clearly driven by Trump's barnstorming in the final weeks of the midterms. But there again, what Trump did in those states was to produce a return to basic political identity in red states and red House districts, while Democrats used Trump and hot-button political issues such as health care to do the same in blue states and blue House districts.

That's a problem for Trump as attention turns to the 2020 presidential election. The results from this week's elections make it clear that the "blue wall" success was much more attributable to Hillary Clinton's poor performance and standing as a candidate than to any of Donald Trump's virtues in either sense. Trump's victory didn't transform any of these states outside of the single cycle in which Trump won, and the only real motion in them was the voter retreat from Clinton. Had Democrats nominated a candidate who paid attention to those states and who could connect with voters better, or perhaps just didn't have Clinton's baggage, it's very possible that Trump wouldn't have won any of them as those states stuck to their normal political identities.

Unless Democrats make the mistake of nominating Clinton again, Trump and Republicans are back to facing a daunting Electoral College map in 2020 — and Democrats have a road map to prevent a repeat of 2016.