The only thing standing between Senate Democrats and an electoral wipeout in 2018? Donald Trump’s base.

A party that’s only three seats short of a Senate majority is nonetheless bracing to play defense for the next two years, hoping to hold a daunting 10 seats in states that went red in last week’s presidential race.

In some of the states — Indiana, Missouri, Montana, North Dakota, West Virginia — Trump’s margin of victory reached nearly 20 points or more. Another five — Michigan*, Pennsylvania, Ohio, Wisconsin, and Florida — unexpectedly swung in the GOP nominee’s favor, instilling fresh fear in Democrats that seats once presumed safe are anything but.

Democrats are nervous not just about the fact that Trump won, but how he did so. The New York real estate mogul won because of his popularity with white working-class voters, whose slow drift from the Democratic Party he accelerated to devastating effect. They abandoned Democrats as few, even seasoned, party operatives suspected they could, leading to victories in places like Michigan and Wisconsin that President Barack Obama won easily just four years ago.

A new game plan

Now, these re-election-seeking Democrats must come up with a game plan to win those voters back — or risk watching their party lose big when they can least afford to see their ranks thinned further.

“The underlying vulnerability Democrats have created for themselves is still very present, and probably uniquely so, with the 2018 class of Senate Democrats — almost every place you can think of where Democrats weren’t able to communicate to working-class voters is on the ballot,” said Josh Holmes, a GOP Senate strategist.

How Democrats do that isn’t yet clear. Democratic strategists say they won’t know for at least several months — after they’ve had a chance to analyze data — exactly what happened in last week’s election. The evaluation process is all the more important given the fact that the party’s polling and data operations showed them on track to win the presidency.

They know they did poorly with blue-collar white voters, they just aren’t yet entirely sure why.

“We’re still in the theorizing mode,” said Matt Canter, a Democratic strategist. “We’ll know a lot more [by] about the beginning of next year.”

The 2018 map for Democrats is so poor in large part because this class of senators faced elections in 2006 and 2012, both strong years for the party. It’s how Sen. Heidi Heitkamp delivered an upset victory four years ago in North Dakota, or how Sen. Jon Tester won in Montana.

Two of the Democratic senators expected to seek re-election — Sen. Bill Nelson of Florida and Claire McCaskill of Missouri — won four years ago thanks to weak Republican nominees (McCaskill defeated former Republican Rep. Todd Akin, whose statement about “legitimate rape” became a national controversy that year.)

Only one Republican senator up for re-election in two years, Dean Heller of Nevada, represents a state won by Hillary Clinton

Democrats don’t dismiss the challenge in front of them but add that they’re confident that many of their incumbents are well prepared to win over white working-class voters. Sens. Bob Casey of Pennsylvania and Sherrod Brown of Ohio, for instance, are traditional blue-collar Democrats who have been popular in coal country.

Another wave?

And as bad as last week’s results were for Democrats, party officials say the history of midterm races gives them hope that they can withstand a terrible map.

With few exceptions, the party that controls the White House suffers loses in a midterm election. The last three — 2006, 2010, and 2014 — have, in fact, been widely hailed as wave elections against the party in power, first against President George W. Bush and twice against Obama.

Trump, they expect, could find the same fate.

“You can’t ignore the fact that the midterm year is usually a difficult election for the party that holds the White House,” Canter said.

Republicans say they know their history. But they hasten to add that it won’t mask the Democrats’ new problem with this key bloc of voters.

“If anybody is giddy about [the prospect of big victories], they haven’t been around politics to know that there’s a lot that can happen between now and 2018,” Holmes said. “But the opportunities are there to run very strong races in areas where Democrats have become disconnected from voters.”

* As of press time, the Michigan presidential race has not been called. Trump leads Clinton by just over 11,600 votes in the latest Associated Press count.