Sen. Robert P. Casey (D-Pa.) gives a victory speech during his election night party in Scranton, Pa. (Jake Danna Stevens/AP)

With blowout races for senator and governor, Pennsylvania received much less attention in the recent midterms than the presidential battleground usually gets during hard-fought campaigns.

Most of its races for the House were settled well in advance of Election Day, thanks to a court-drawn map more favorable to Democrats.

But that’s about to change now that the political calendar is turning toward the presidential season, particularly because President Trump’s biggest 2016 upset took a very sharp turn this year away from Republicans.

Look at Sen. Robert P. Casey Jr.’s more than 13-percentage-point victory last month, only to be topped by Gov. Tom Wolf’s 17-point reelection win. Those Democrats torched the four suburban counties surrounding Philadelphia and Allegheny County, home to Pittsburgh and its inner suburbs, by margins never before seen.

Take Chester County, the wealthiest in Pennsylvania, due west of Philadelphia. Hillary Clinton broke through the traditional GOP stronghold in 2016, winning by 9 percentage points over Trump. Casey won there by 20 percentage points.

“You can’t attribute that just to a verdict on me,” Casey said in an interview inside his Senate office, giving Trump’s unpopularity much of the credit.

Wolf won there by 24 percentage points, actually topping Clinton’s raw vote total in Chester County from the higher-turnout 2016 race. “A ton of Republicans were voting for a Democratic candidate for the Senate and governor,” Casey said.

These results will make Pennsylvania, and its 20 electoral votes, the top target for the Democratic presidential nominee in 2020.

Michigan, with 16 electoral votes, also saw a sharp swing away from Republicans. Democrats there won governor and Senate races by comfortable margins, though not quite as big as in Pennsylvania, while picking up a few House seats.

If the Democratic nominee wins those two states, Trump’s electoral total would drop to 270 based on states he won in 2016.

That would leave him not one electoral vote to spare as Democrats would also fight to win back Florida, Wisconsin, Iowa, North Carolina and possibly Ohio. At this point, Minnesota appears to be Trump’s only new offensive target for 2020.

Republicans in Pennsylvania are quick to caution against any retreat, particularly if Democrats nominate someone whom rural voters view as a cultural elitist.

In those Philadelphia suburban counties, Clinton topped Barack Obama’s margin in his victorious 2012 bid in Pennsylvania — but she was crushed in rural counties.

Clinton lost Cambria County, anchored by Johnstown, the onetime Democratic-leaning steel city, by 38 percentage points. She lost by twice as many votes as Obama had done in Cambria four years earlier, a shift replicated enough in other rural counties that added up to her 44,000-vote defeat.

“That scenario can happen again,” Christopher Nicholas, a Republican consultant in Harrisburg, said Friday.

Still, Nicholas recognized that this year provided a forewarning. He ran ad campaigns for several state legislative Republicans outside Philadelphia — popular incumbents who had easily won in recent elections only to lose in November to unknown Democrats.

“Half their vote was from people who had never heard of them,” Nicholas said of the Democratic candidates in the suburbs.

The broader problem was spelled out by G. Terry Madonna, who runs the Center for Politics and Public Affairs at Franklin & Marshall College, and Michael L. Young in a memo laying bare the Republican struggles:

* Democrats have won four of the past five governor’s races, each by more than 9 percentage points;

* Republicans lost 11 seats in the state House and five in the state Senate, creating the chance for Democratic majorities after 2020;

* Republicans performed even worse in down-ballot statewide contests: They have lost six straight races for state auditor, four straight for state treasurer and two straight for attorney general.

“The problem now is Republicans don’t have a bench,” Madonna said in an interview.

He said he questioned whether 2016 might have been an irregular blip on the state’s political march toward Democrats.

Of eight statewide races in the past three elections, Republicans won just two — Trump and Sen. Patrick J. Toomey (R), both in 2016.

Two Pennsylvania Democrats, state Attorney General Joshua Shapiro and Treasurer Joseph Torsella, actually received more votes than Trump two years ago.

The uncomfortable question for Pennsylvania Democrats is, what do their six statewide winners in 2014, 2016 and 2018 have in common?

All were white men.

Clinton and Katie McGinty, Toomey’s opponent, were the lone Democrats defeated.

“Isn’t that a male-female story? It was on that day,” Casey said. “But I’m not convinced yet that it would be, if you had another woman running for president, another woman running for the Senate. I’m not convinced that would be the case. There was something about that moment and those candidates.”

This year, Democratic women claimed four House seats, the first time Pennsylvania will ever send more than two women to Congress.

Casey believes a Democratic presidential nominee, man or woman, can keep Trump’s margin down in the rural towns if they follow the Wolf-Casey approach.

“Get there physically, listen to them, show up and give a damn,” he said.

His first ad, run heavily in the western part of the state, showed coal miners talking about Casey’s legislation to help with their health benefits. A second ad showed a mother talking about the opioid epidemic in that part of the state.

Clinton devoted outsized attention to Pennsylvania, including an epic election eve rally outside Philadelphia’s Independence Hall with Bruce Springsteen, Katy Perry and the Obamas.

But her campaign focused heavily on liberal cultural issues, running ads that questioned Trump’s fitness for office. She received just 26 percent of the vote in the rural areas and small towns, according to exit polls.

Last month, Casey received 44 percent of that same region’s vote.

That came despite an ideological transformation in which he abandoned the culturally conservative views of his late father, former governor Robert Casey Sr.: The son now supports most gun-control proposals and in 2013 backed same-sex marriage.

His message for 2020 contenders is to follow that same path. The nominee will not abandon Pennsylvania’s urban or suburban voters, the new Democratic base. He or she does not need to win a majority in small rural towns, but must do better than Clinton.

“You can do better than whatever we’ve been getting there,” Casey said.

Read more from Paul Kane’s archive, follow him on Twitter or subscribe to his updates on Facebook.