Ed Gillespie masterminded the devastating 2010 GOP strategy to retake Washington by winning crucial state and local elections that brought the power to redistrict the U.S. House.

His plan, aptly dubbed REDMAP, worked so well that Republicans captured almost 700 state legislature seats in an epic rebuke of Barack Obama and Democrats nationwide. The true spoils of that victory came the following year. New GOP majorities in Michigan, Ohio, North Carolina, Wisconsin, and Pennsylvania reinvented the gerrymander as a blunt-force partisan weapon.

It took Democrats many years to realize how long-lasting the consequences of 2010 would be. Now—just as the Supreme Court is hearing oral arguments in Gill v Whitford, a landmark case that could create the first-ever constitutional standard to define when a partisan gerrymander goes too far—Democrats have realized that the future of their party will be determined down-ballot. Gillespie, the godfather of the GOP gerrymander and the Republican nominee for governor of Virginia, is their most crucial target.

A Gillespie win, combined with well-cemented Republican majorities in the state assembly and senate, would lock in GOP control when new legislative districts for statewide and congressional races are drawn in 2021.

A victory by Democratic lieutenant governor Ralph Northam, meanwhile, would give Democrats a seat at the table when the new lines are drawn—something the party lacked in those blue and purple states nationwide in 2011, thanks to REDMAP.

As a result, in 2012, the first election held under these new maps, Democratic House candidates won 1.4 million more votes, but Republicans retained a 234-201 majority. Republicans commanded huge edges in states where Democrats won a majority of votes, like North Carolina (9-4), Pennsylvania (13-5) and Michigan (9-5), and drew lines that handed themselves 75 percent of Ohio’s 16 seats with just over 50 percent of the vote. Not a single congressional seat has swung blue in any of those swing states this decade.

Earlier this month, the National Democratic Redistricting Committee—the brainchild of Obama, who has named redistricting as his top post-presidential priority, and led by former attorney general Eric Holder—announced its first major contribution. They poured $500,000 into Northam’s campaign, boosting him to a $3 million cash-on-hand advantage over Gillespie, a well-connected operative, as this crucial race enters its final weeks.

That’s a big deal—but also a testament to how many pages Democrats have stolen from Gillespie’s playbook. The NDRC exists because Democrats needed to play catch-up after Gillespie’s Republican State Leadership Committee invested $30 million downballot in 2010, catching snoozing Democrats by surprise and capturing key state legislative chambers on the eve of redistricting. Republicans won the right to unilaterally draw 193 of 435 U.S. House seats; Democrats controlled just 44.

Now the arms race has been engaged. Democrats will spend mega-millions in Virginia before Election Day. The billionaire Democratic investor Tom Steyer has already committed millions to an aggressive get-out-the-vote campaign aimed at delivering immigrants, college students, and supporters of abortion rights to the polls. Unions, environmental groups, and the Democratic Governors Association are also in for well over seven figures each. On the GOP side, the Republican Governors Association has announced that it is all-in for Gillespie, as are various spending committees aligned with the Koch brothers and the National Rifle Association.

“ Democrats, awakened from their slumber, appear attuned to the importance of winning locally—rather than just focusing resources on the White House. ”

Democrats, awakened from their slumber, appear attuned to the importance of winning locally— rather than just focusing resources on the White House every four years. They’ve flipped eight state legislative seats blue already, even in surprising places like Oklahoma and Florida, sometimes reversing double-digit GOP advantages last fall. It was not clear that Democrats understood this as recently as June, when $30 million flowed into one special congressional race in Georgia’s sixth. Jon Ossoff lost, and every squandered dollar went up in flames.

What’s not clear is whether Democrats realize just how uphill the party’s struggle will be in 2018. Many Democrats remain focused on taking back the U.S. House, despite the fact that the surgically crafted REDMAP lines have drastically reduced the number of swing seats and given the Republicans a baked-in structural advantage likely to withstand even a blue wave. Democrats, according to the most knowledgeable estimates, will likely need to win the total U.S. House vote by double digits in order to have even a 50/50 chance of taking a majority of seats. That’s a steep path in these polarized times.

Democrats need a long-term strategy to win back state legislatures, and a short-term strategy aimed at electing governors who can veto tilted maps. Any comeback must begin in Virginia, then pivot to governor’s races in Michigan, Ohio, Wisconsin, Pennsylvania and Florida. This will not be easy. Republicans have a deeper bench (another gerrymandered advantage) and may begin as the favorites everywhere.

If Democrats lose? They won’t have say over most state legislative or congressional maps until 2031. Republicans have done such a masterful job at drawing local legislative lines in these states, for example, that the GOP commands a 66-33 state house majority in Ohio, a 121-81 advantage in Pennsylvania, and has kept control of the Michigan house in 2012, 2014 and 2016—all years when Democrats won more votes. Given enduring, computer-driven majorities in these all-important states, Democrats need to win these key governor’s races or face GOP majorities in Congress for another decade. After all, the technology that made these unbeatable lines possible in 2011 has only gotten more precise and powerful.

While the NDRC’s Virginia investment suggests Democrats have learned their lesson, Republicans have hardly lost focus. The Republican Governors Association has outraised the Democratic Governors Association this year, $36 million to $21 million. Just this week, Republicans also announced they’d budget $35 million toward the National Republican Redistricting Trust, to counter the Obama/Holder group. That’s three times what the NDRC has announced raising in 2017.

Democrats find themselves adrift because they focused on the sexy race for the White House and neglected essential, but duller, down-ballot battles. If they compound this error by prioritizing the U.S. House, and don’t focus on winning those six governors’ races, they will face a generation in the wilderness. The time is now: There will be no hope for Democrats to reshape the battle lines for the 2020s after Election Night 2018.

David Daley is the author of Ratf**ked: Why Your Vote Doesn’t Count and the former editor in chief of Salon.