WASHINGTON — Democrats made gains and held critical seats in the Midwestern and Rust Belt states that Donald Trump flipped in 2016, raising hopes that the party can still compete in 2020 and beyond.

Democratic senators in Pennsylvania, Ohio, Michigan and Wisconsin won, all states that were pivotal to Trump's Electoral College victory. Both of Minnesota's senators also easily prevailed, despite Trump's close 2016 margin in the state.

But Republicans won two key governor's races, in Iowa and Ohio, and there were signs below the surface that some changes Trump had wrought are here to stay.

Pollsters, political strategists and academics say there wasn't one neat story coming out of the region after the midterms, with wide variation in Democrats' performance from state to state and race to race.

In many cases, trends from the last election seemed to pick up speed in 2018, with Democrats gaining even more in well-off suburbs and Republicans still surging in rural and working-class areas. The results suggest that whatever the future holds for Democrats, a winning map in each state might not look the same as it did under President Barack Obama.

Minnesota, where Democrat Tim Walz won the governor's seat and his party captured the state Legislature's lower chamber, may have best exemplified the Trump-era realignment in the region.

Democrats won two Republican-held House seats in the affluent Minnesota suburbs and took control of the Legislature. But despite a strong night overall, they also appear to have lost two House seats in the rural Iron Range and southern counties, both of which have trended sharply Republican under Trump.

But there were also encouraging signs for Democrats in Minnesota, as well as other Obama-Trump states, that the right candidate could bridge the gap between Trump-trending and Democrat-trending voters.

Sen. Amy Klobuchar won a commanding 60 percent of the vote on Tuesday, including strong performances in the Iron Range. She easily outpaced fellow Democratic Sen. Tina Smith, who picked up a more modest 53 percent of the vote en route to an easy victory.

In Pennsylvania, where Democrats had one of their best performances, Gov. Tom Wolf and Sen. Bob Casey romped to huge wins against GOP opponents who mirrored Trump's style but never made either race competitive.

Their victories were powered by even higher margins than Clinton in Democratic-trending suburbs, but candidates also showed strength in some areas that Trump flipped. Casey won working-class Erie County in the northwest by 18 points, which Trump had narrowly carried, and held down GOP margins in coal country. That suggests some ancestral Democrats who defected to Trump may not be lost.

But these trends didn't translate to gains across the board either: Republicans held onto several tough House seats even with a new court-ordered map that was more favorable to Democrats.

Republican strategist John Brabender, who worked on several 2018 campaigns, including Pennsylvania Rep. Lou Barletta's losing race against Casey, said the results raised troubling questions for Republicans moving forward, including whether crossover voters in 2016 might have been protesting Hillary Clinton rather than supporting Trump.

"I know a lot of people will say it's bad news for the president," he said. "We don't know that, but we know a pro-Democrat voter in the Rust Belt states who voted for Donald Trump in 2016 isn't an automatic Republican vote when Donald Trump isn't on the ballot."

Michigan was another bright spot for Democrats, led by Gretchen Whitmer's decisive win in the governor's race. Sen. Debbie Stabenow defeated Republican challenger John James by six points, though it was a relatively modest margin given that she was favored throughout. Democrats also picked up a House seat in the Detroit suburbs, with Elissa Slotkin defeating Rep. Mike Bishop.

But in Ohio, the picture looked darker for Democrats. Republican Mike DeWine defeated Democrat Rich Cordray in the hotly contested governor's race thanks to strong turnout in rural and working class areas Trump excited in 2016, managing to overcome similar bumps in turnout in Democratic-trending areas. Republicans maintained their hold on key positions like attorney general, secretary of state, treasurer, and auditor.

At the same time, Sen. Sherrod Brown held his seat with a 6.5 point margin, again suggesting there's room for a Democrat to win with the right brand. In his victory speech, Brown called his campaign "the blueprint for our nation in 2020."

The results could bolster the case for potential presidential contenders who have an established appeal with rural and blue-collar voters, like Brown, Klobuchar or former Vice President Joe Biden, over more progressive rivals.

"Good news for the Dems: These voters are reachable with the right kind of candidate," said Jeff Blehar, an elections analyst for Decision Desk HQ. "Bad news for the Dems: It's not the kind of candidate you're likely to nominate for 2020."

Similarly in Iowa, results were mixed. Democrats made gains on a congressional level, winning two seats and even threatening ultra-conservative Rep. Steve King, who was effectively disavowed by the national Republican Party over his ties to far-right and anti-Semitic figures.

Democrat Abby Finkenauer's victory over Rep. Rod Blum in Iowa's 1st District, a longtime bastion for union Democrats that swung toward Republicans in recent years, offered the party hope that the spell Trump cast wasn't permanent.

At the state level, though, things looked very different. Republican Gov. Kim Reynolds won in a mild upset over Democrat Fred Hubbell. Democrats picked up a few statehouse seats, but lost state Senate seats at the same time, leaving Republicans with unified control of government.

Jeff Link, a Democratic strategist who advised Hubbell, described an election night similar to other states in the Trump era. First, elation at better-than-expected margins in cities and suburbs, followed by groans as even more decisive rural margins came in.

"I think we've figured out messaging for college-educated people in cities, but we can't do that at the expense of rural communities," he said. "If we ignore them, it becomes very difficult to win the United States Senate and it becomes very difficult, I think, to win the presidency."

In Wisconsin, Democrat Tony Evers narrowly toppled two-term Gov. Scott Walker while Sen. Tammy Baldwin, a prime target early in the cycle, easily dispatched challenger Leah Vukmir by a double-digit margin.

Both made gains in wealthy suburbs, including crucial Waukesha County, that typically vote Republican, even as Walker improved in some rural areas. In an extremely encouraging sign for Democrats looking to 2020, their base in the Milwaukee area showed up in huge numbers after a fatal collapse in turnout in 2016.

Charles Franklin, a pollster and professor at Marquette University Law School, noted that Democrats flipped southwestern counties that Trump won en route to his 2016 win, and Baldwin showcased her strength in the Green Bay area, which normally votes Republican. Overall, Baldwin won 17 counties that went for Trump in 2016.

Franklin identified the party's relentless emphasis on health care as a potential factor in their turnaround.

"In our poll, those ranking it most important went 65 percent Evers and 70 percent Baldwin,” he said.

With health care a top issue in almost every major race, the results could offer a valuable blueprint for how to compete against Trump in 2020 versus 2016, when Democrats focused more on his offensive behavior.

Democrats were not successful in Wisconsin at the state legislative level, though, where gerrymandered district lines helped boost Republicans.

Amanda Litman, whose group Run For Something recruited young Democratic candidates in statehouse races around the country, said Democrats needed to continue running plausible contenders in working-class areas year after year to build a foothold.

"Winning back Obama/Trump voters won't happen in a single cycle," Litman said.