But Tuesday’s election shows how hard it may be for the president to repeat that feat in 2020, as Democrats swept contests for governor and U.S. Senate in all three states. These are the states that propelled Trump to the White House two years ago by the slimmest margin and would be key to any re-election victory.

The good news for Democrats, said Paul Maslin, a pollster for the party, was that Election Day indicated how Democrats could bounce back in those three states.

“It shows how we can narrowly get over 270 (electoral votes),” said Maslin. “The bad news is, each of these states is still a huge fight.”

The battle lines in these Rust Belt states were drawn by stark political trade-offs of Trump’s Republican brand. Trump won here in 2016 when massive gains among blue-collar and rural whites outweighed his weaknesses in the suburbs and cities.

That math backfired in the midterms. The rural vote mostly held for his party. But Republicans lost ground in the suburbs and were swamped by a huge outpouring in cities of Democratic voters mobilized against the president.

In Wisconsin, Republican Gov. Scott Walker lost college-educated voters by 13 points after winning them by 1 point in 2014, according to exit polls. His suburban base softened in metropolitan Milwaukee, where those suburbs had been an absolute bedrock for his party.

“Rural is going more red, and urban and suburban are trending blue. Now you’ve got (conservative) suburban places that are ticking toward being less Republican,” said GOP strategist Mark Graul, who ran his party’s presidential campaign in Wisconsin in 2004.

“I think Wisconsin cemented its status as a top-tier state for 2020,” he said of the 2018 election, meaning a top target for both parties.

In Michigan, Democrats won races for governor and U.S. Senate and picked up two GOP U.S. House seats. They stemmed their blue-collar bleeding in places and saw success in metropolitan Detroit – urban and suburban.

Wisconsin Gov. Scott Walker holds up a sign to tout his record on job creation. On Nov. 6, 2018, Walker, a Republican, lost the governor's race to Democrat Tony Evers.(Photo: Michael Sears / Milwaukee Journal Sentinel)

“The somewhat surprising thing to me in 2018 is that Democrats were able to win back some working-class voters while gaining with suburban women and others … including some Trump voters,” said Matt Grossmann, an associate professor of political science and director of the Institute for Public Policy and Social Research at Michigan State University. “Democrats may have been able to mobilize both their new and old constituencies.”

In Pennsylvania, populous Philadelphia and its suburbs reasserted their voting power. Philadelphia and Lehigh Valley voters sent four women to the U.S. House of Representatives. Two Democratic incumbents, Gov. Tom Wolf and U.S. Sen. Bob Casey Jr., cruised to re-election with double-digit wins.

“I have seen Trump make huge improvements to the economy and job market – but I’m not a Trump supporter. To me, all that takes a back seat when it comes to the character of the person,” said Edward Mikus, 64, of Philadelphia, a self-described independent voter.

Ellen Burns, 68, of Scranton, is a registered Republican. However, she hasn’t voted with the Republican Party since the election of George H.W. Bush.

“My party left me a long time ago,” said Burns. “What we see now is not the Republican Party.”

GOP loses ground in big metro counties

The pattern was illuminating last week in Wisconsin, where Walker lost by 1 point after winning re-election in 2014 by 6 points.

The places where Walker did better than 2014 were the same ones that saw the biggest swings toward the GOP in Trump’s 2016 victory: small rural counties in central and northern Wisconsin.

Walker lost the most ground in the same places that swung away from the GOP in the 2016 race for president: the more educated red suburbs around Milwaukee, the blue suburbs around Madison, and the blue urban bastions of Madison and Milwaukee.

In other words, the hint of a realignment in 2016 was echoed in 2018. The “education gap” widened. And Trump’s strengths and weaknesses rubbed off on Walker, even though the two-term governor was a different style of Republican and had an entrenched identity in his own right.

But those trade-offs worked out poorly for Walker in 2018, since small gains in less populated places were overwhelmed by big declines in population centers.

In Wisconsin’s U.S. Senate race, Democrat Tammy Baldwin made even bigger inroads in the Republican suburbs and cut into the GOP’s blue-collar base, winning 47 percent of whites without a college degree.

In Michigan, Democrats took back the governor’s mansion and attorney general’s office for the first time in eight years, and re-elected U.S. Sen. Debbie Stabenow to a fourth term. Two newcomers, both women – Elissa Slotkin and Haley Stevens – flipped two U.S. House seats in Detroit’s suburbs that had long been held by Republicans.

In Wayne County and Detroit, the Democratic margins grew by 115,095 votes in congressional races over 2014. In Oakland County, once a Republican bastion, the margins grew by 93,897 votes.

Even in more blue-collar Macomb County, largely credited for delivering Trump his victory, Democrats improved their margins. In Ingham County, home to Michigan State University, a boost in the Democratic vote helped Slotkin beat U.S. Rep. Mike Bishop, R-Rochester.

What about 2020?

Because Trump won the three “blue wall” states by tiny margins in 2016 against an unpopular Democratic opponent in Hillary Clinton, he may very well need to expand his base of support to win them again in 2020.

But there is not much evidence that has happened.

Trump won Wisconsin with 47.2 percent of the vote in 2016, and his approval rating in the state’s 2018 exit poll was 48 percent. He won Michigan with 47.5 percent, and his approval rating in the 2018 exit poll was 44 percent. He won Pennsylvania with 48.2 percent, and his approval rating in the 2018 exit poll was 45 percent.

Heading into the midterms, the most recent national polling by Gallup had Trump's approval rating at 40 percent.

Democrats face their own challenges in resurrecting the blue wall, however.

For starters, it was never quite as solid a “wall” as the phrase suggests. Wisconsin, maybe the shakiest state of the three for Democrats, had voted Democratic for president seven times in a row. But Republican George W. Bush came within a fraction of winning it twice. And Democrats need to win all three states in 2020 if nothing else changes on the map.

A second caveat for the party is that for all his impact on the midterms, Trump wasn’t on the ballot in 2018. Just because other Republicans failed to replicate his victory formula in these states doesn’t mean Trump himself can’t do it in the next presidential race.

“Trump is a different candidate,” said Pennsylvania pollster Terry Madonna.

President Donald Trump declared the midterm elections a big victory for Republicans, but Democrats gained ground, sweeping contests for governor and U.S. Senate in Michigan, Pennsylvania and Wisconsin on Nov. 6, 2018.(Photo: ~File photo)

And finally, Trump’s blue-collar base of support persists in these disproportionately blue-collar states.

"Non-college" whites were 47 percent of the vote in Michigan on Nov. 6, 44 percent in Pennsylvania and 54 percent in Wisconsin.

Even though much of that vote is scattered across small rural counties, it adds up. In Wisconsin, white “non-college” men have moved from a 5-point Republican lean to a 16-point Republican tilt over the last six years, according to voluminous polling in the state by the Marquette Law School.

If it continues, the GOP’s suburban erosion is “deadly for them,” said Maslin, the Democratic pollster.

But “rural Michigan, Pennsylvania and Wisconsin are still a challenge (for us) ... the swing can still happen in any direction," he said.