With Republicans at a historic high in control of state legislatures, Democrats are poised to make up lost ground in the 2018 midterm elections.

“Democrats are going to have a wave this year,” said Tim Storey, senior political analyst for the National Conference of State Legislators. “The question is the size of it.”

Democrats badly need a big wave. During the eight years of the Obama presidency they lost 958 state legislative seats, 12 governorships, 62 House seats and 11 U.S. Senate seats. These losses had consequences, particularly in the states. With Congress frequently gridlocked, Republican legislative majorities pushed through a largely conservative agenda in many states on issues ranging from abortion restrictions to tax reductions.

Going into this year’s midterms, Republicans hold a 33-16 edge in governorships. (Gov. Bill Walker of Alaska is an independent.) The GOP controls both legislative chambers in 32 states with Democrats controlling 14 and party control split in four states.

History is on the Democrats’ side. Briefing legislators on the final day of an NCSL conference in Los Angeles last week, Storey observed that in 27 of 29 midterm elections since 1902, the party out of power in the White House had made gains averaging 412 legislative seats.

Midterms are inevitably a referendum on the president. As such, gains for the out-of-power party have been relatively slight when the president had an approval rating of 56 percent or higher in Gallup surveys. When approval ratings fell below that threshold, the party of the president suffered massive losses.

In 2010, a breakthrough midterm for Republicans, the GOP took control of Congress and picked up 680 state legislative seats, capturing 20 legislative chambers that had been held by Democrats. President Obama’s approval rating at the time in the Gallup survey was 44 percent. President Trump’s approval rating in the latest Gallup survey was 40 percent; it is 43.1 percent in the RealClearPolitics poll average.

Based on this historical record, Democrats could be poised for a big win in 2018.

Results of state legislative elections held since Trump became president also point to a possible Democratic breakthrough. Democrats have won 42 seats previously held by Republicans, who won seven previously Democratic seats. The Democratic victories include unexpected gains of 15 seats in the Virginia House of Delegates last November.

Storey says Democrats have an edge in finances and in voters motivated by an intense dislike of Trump. Republican advantages include a robust economy and the possibility Trump will fire up his base by campaigning for endangered GOP candidates, as he has promised to do.

Republicans recognize they’re in trouble. “It does feel very much like 2010 reversed to me right now,” said Gov. Bill Haslam of Tennessee, the head of the Republican Governors Association, interviewed in late July at a national conference of governors. “There’s a lot more conviction about voting on the Democrat side than our side, which is a concern to us.”

Democrats have numerous opportunities in governors’ races. The latest RCP poll averages give Democrats a chance to win 11 governorships now held by Republicans. Democrats are favored in four of these races and the other seven are listed as tossups.

In New Mexico, where current Republican Gov. Susana Martinez is term-limited, Rep. Michelle Lujan Grisham, chair of the Congressional Hispanic Caucus, is the nation’s first Democratic Latina nominee for governor. She’s favored over Trump supporter Steve Pearce, one of many conservative Republicans elected to the U.S. House in 2010.

Eight of the 11 endangered Republican governorships are open seats, historically easier to win than governorships defended by an incumbent. In addition to New Mexico, the open governorships are in Florida, Georgia, Maine, Michigan, Nevada, Ohio and Tennessee.

Three Republican governors seeking re-election face stiff challenges. The most endangered is millionaire Gov. Bruce Rauner of Illinois, who trails in polls to Democratic billionaire J.B. Pritzker, heir to the Hyatt hotel fortune. Spending in this race has already exceeded $200 million; it’s likely to be the most expensive governor’s race of all time.

The other two GOP governors with stiff challenges are Doug Ducey of Arizona and Scott Walker of Wisconsin. Their Democratic opponents will be chosen in primaries later this month.

Noteworthy among the Democratic nominees is Stacey Abrams of Georgia, the first African-American woman in the nation to be nominated for governor by a major party. She’s an underdog against the GOP nominee, Secretary of State Brian Kemp.

No Democratic-held governorship at this point is listed as endangered, but Republicans have potential opportunities in Colorado and Connecticut, where Democratic governors are termed out. Republican Walker Stapleton faces Democrat Jared Polis in the former; that latter’s primary is Aug.14.

Storey, who has an impressive forecasting record in state legislative elections, said that with more than 90 days remaining before the elections it’s too early to say whether 2018 will prove to be the tsunami for Democrats that 2010 was for Republicans. Democrats will gain, he said, but are so far behind it may take more than one election to achieve parity with Republicans.

As Storey sees it, Democrats in a normal wave could win both houses in Arizona if they’re able to energize Latino voters. They have a solid chance of winning the Colorado Senate, where Republicans hold a one-vote majority, and the Connecticut Senate, which is tied.

Other possible Democratic legislative pickups in a normal-size wave would include the New Hampshire Senate and House, the Maine and Wisconsin senates, the New York Senate. Although Democrats technically have a majority in the New York Senate, power is wielded by a Republican-leaning coalition.

Storey said that in a big wave Democrats would also have a shot at winning the houses in Minnesota and Pennsylvania, the senates in Florida and Iowa and both houses in Michigan.

More is at stake than bragging rights. These elections mark the beginning of the battle for statehouse control in the next decade. In 2021 new legislative and congressional maps based on the 2020 census will be drawn by legislatures, many of them subject to veto by the governor. (Thirteen states redistrict legislatures by independent commissions; seven do so for U.S. House districts.)

Thirty-two of the 34 governors who will be elected in November will be in office when the new districts are drawn. (New Hampshire and Vermont have two-year gubernatorial terms.) More than 800 of the legislators who are elected this year will also be in office.

Winning the U.S. House of Representatives remains the No. 1 Democratic priority in 2018. But what happens in the less-publicized state legislative and gubernatorial elections may have more far-reaching consequences.