In 2014, when newly elected Virginia Governor Terry McAuliffe tried to get the state Legislature to approve Medicaid expansion under the Affordable Care Act, he ran into a bright-red wall in the House of Delegates. Even though 100 percent of the initial cost was to be paid by the federal government, 66 of the chamber’s 67 Republican Delegates voted against the measure. Later that year, in a special session, McAuliffe tried and failed again. A 2017 effort died as well, once again on a party-line vote. As a result, almost 400,000 low-income Virginians went without health insurance, even as Medicaid enrollment grew by some 16 million nationwide.

Then, last November, Democrats pulled off a massive upset at the polls: 15 challengers, 11 of them women, captured GOP-held seats in the House of Delegates. A 16th victory, and control of the chamber, vaporized when a tie vote was settled, quaintly, by drawing lots from a ceramic bowl, allowing Republican David Yancey to retain his seat. Still, Democrats shifted the balance from 66–34 to 51–49. And this February, a budget that included Medicaid expansion passed the House of Delegates 68–32, with 19 Republicans in support, including Yancey.

Listen to Joan Walsh on the Start Making Sense podcast.

“Elections have consequences,” Republican Delegate Glenn R. Davis Jr. told his colleagues a little mournfully, as he flipped from opposing the Medicaid expansion to supporting it. Davis, for what it’s worth, had survived a challenge from Democrat Veronica Coleman, an African-American pastor, by less than four points.

“The only reason it happened was: We are 49 now!” said a jubilant Jennifer Carroll Foy, the newly elected Democratic delegate from Woodbridge, when I spoke with her by phone. While the measure is unlikely to pass the GOP-controlled State Senate this year, Carroll Foy says the progress on Medicaid expansion is just the beginning of the effort to bring Virginia’s policies in line with the state’s increasingly liberal electorate, which has been woefully underrepresented in Richmond for years, especially after Republicans gerrymandered the state map in the wake of the 2010 election.

When I first wrote about the amazing crop of women running for the Virginia House of Delegates last year, I quoted Daily Kos’s Carolyn Fiddler, a noted expert on state politics, on “the Trump effect”—the ferocious feminist rage over the election of an admitted pussy-grabber that inspired so many women to enter politics for the first time. “If that fucking schlub can be president, I can run for office,” Fiddler memorably told me.

But as we head into the first national elections since Trump’s inauguration, Democrats are talking less about “the Trump effect” than they are about “the Virginia effect”—the unprecedented surge of women, minority, and millennial candidates running for seats in their state legislatures, many in deep-red districts long written off by the Democratic Party establishment. These candidates have been buoyed by a raft of outside and resistance groups, including Indivisible, Emily’s List, Run for Something, Forward Majority, Sister District, and BlackPAC, among many others. But party leaders have also taken note of this wave and are finally beginning to invest meaningfully and systematically in local candidates.

It’s about time. The Democratic Party is in a deep, deep hole at the state level. Since 2009, it has lost a net 968 seats in statehouses across the country, giving Republicans control of the legislature in 32 states, 25 of which are also led by a Republican governor. This imbalance has had devastating and widespread repercussions. It’s allowed Republicans to further gerrymander districts, consolidating their lock on state legislatures and the US House of Representatives. The creation of these safe, polarized districts has in turn brought to power a new breed of far-right lawmaker—people like Representatives Glenn Grothman of Wisconsin, Blake Farenthold of Texas, and Freedom Caucus chair Mark Meadows of North Carolina. Meanwhile, states where Republicans enjoy trifecta control—of the governorship and both houses of the legislature—have been turned into laboratories for extreme right-wing policies: regressive tax cuts, harsh voter-suppression laws, punitive labor restrictions, anti-LGBTQ legislation, and cruel health policies, especially on the issue of abortion. And, perhaps less studied, the loss of so many statehouse seats has dampened Democratic energy, shrinking the pipeline of potential candidates while also contributing to losses further up the ballot. Elections have consequences.

Arguably, this up-ballot effect extends all the way to the presidency itself. Since 2010, Republicans have had a stranglehold on state legislatures in Michigan, Wisconsin, and Pennsylvania, even though all three states have reliably voted Democratic in presidential elections since 1992. That is, until 2016.

Since Trump’s victory, however, Democrats have flipped 39 statehouse seats, counting the 15 Virginia pickups plus four in New Jersey. Amazingly, 20 of these victories have come in special elections, mainly in districts carried by Trump, some by very large margins, in places as varied as Wisconsin, Missouri, Kentucky, and Florida. Democrats have taken five GOP statehouse seats in purple New Hampshire, four in red Oklahoma, and a big one in Washington State last November 7, when activist Manka Dhingra grabbed an open seat formerly held by a Republican, flipping the State Senate to blue. Almost immediately, Washington passed a statewide automatic-voter-registration law, which Governor Jay Inslee signed on March 19. Earlier in March, a bill was passed banning so-called conversion therapy for LGBTQ folks. Elections have consequences.

Nationwide, there are 7,383 state legislative seats, and 6,066 of them, in 87 out of 99 chambers, will be on the ballot this November. Democrats aren’t quite running a 7,383-seat (or a 6,066-seat) strategy—at least not yet. But after years of frustration and neglect, it’s no longer impossible to imagine the day when the party contests every single statehouse seat in every state in the Union. Party insiders, activists, resistance groups, and candidates—from Maine to Minnesota, from Arizona to Georgia, and all the GOP-dominated states in between—are gearing up for an unprecedented number of races in 2018. In dozens of states, Democratic leaders are vying to bring about “the next Virginia,” in the words of North Carolina Representative Graig Meyer, who is part of a recruitment effort that has enlisted a Democratic challenger for every Republican incumbent in both houses of the state’s General Assembly for the first time in recent memory. In 2014, by contrast, 34 GOP incumbents in the State House of Representatives and 12 in the Senate went unopposed. Ohio Democrats have likewise recruited a challenger in every legislative district in the state. And in Pennsylvania, the number of Democrats who have filed to run for the State House and Senate outnumber Republicans 56 percent to 44; most of the Republicans are incumbents.

A blue wave in North Carolina would be particularly significant, since the state has experienced what many election experts say is the most brazen example of gerrymandering in the country. Drawn up by a Republican-controlled Legislature with the express purpose of electing Republicans, the state’s new map led to the GOP taking 10 of 13, or 77 percent, of the House seats on the ballot in 2016, even though Republican candidates won just 53 percent of the vote statewide. In January, a federal court ordered the state to redraw that map, ruling that it was “motivated by invidious partisan intent” and in violation of the 14th Amendment. The Supreme Court has blocked that order pending its decision on a host of gerrymandering cases that the Court has in front of it this year.

North Carolina also demonstrates how statehouse losses reverberate up the ballot. Barack Obama won the state in 2008 but lost it in 2012. Democratic Senator Kay Hagan lost to Republican Thom Tillis by more than 45,000 votes in 2014. Hillary Clinton made the state a top priority in 2016 and still lost to Trump by more than three points. Newcomer Deborah Ross also lost a Senate race to incumbent Richard Burr that year, even though the party poured resources into her campaign. And beyond the Tar Heel State, this trend is evident almost everywhere the GOP prevailed in 2010. With fewer Democratic governors and state legislators in office, dispirited base voters stopped turning out for the higher-stakes elections. Donald Trump sits in the White House today because, all around the country, Democrats lost statehouse after statehouse due to a combination of neglect and an assault by dark money and the entrenched forces of reaction. They don’t intend to make the same mistake in 2018.

But taking back the states will mean more than just running more status quo politicians. State parties will have to change how they recruit candidates, how they work with outside groups, and what strategies they allow candidates to use. Is the Democratic establishment truly ready to make room for this new wave?

It took Democrats a long time to get into this mess—and it will take more than one election cycle to get out of it. Sadly, what seemed like the zenith of Democratic political participation—the election of the country’s first black president in 2008, when Democrats also increased their majorities in both houses of Congress—held the seeds of the party’s undoing. Almost immediately, a white racial backlash took shape, most visibly in Tea Party rallies across the country. Savvy Republicans recognized that the demographic trends that cost them control of the federal government could ultimately doom them, and they moved swiftly to capitalize on the conservative base’s rage.

Their answer was to launch a multipronged attack on democracy itself. One prong was to demoralize Obama’s coalition of young voters, people of color, and women, and make it harder for these constituencies—especially minorities—to cast a ballot. But perhaps the most important part of that strategy was to focus crushing energy and resources on taking over state legislatures. This, Republicans realized, was the key to drawing new electoral maps, both for state legislatures and the US House of Representatives. They didn’t need to win over a majority of Americans; they just needed to rig the game so that an ever smaller, older, and whiter pool of voters could consistently prevail.

This strategy was never a secret, and it had been in the works for a long time. Writing in The Wall Street Journal in 2002, senior George W. Bush adviser Karl Rove explained a plan known as REDMAP (short for “Redistricting Majority Project”): “Republican strategists are focused on 107 seats in 16 states. Winning these seats would give them control of drawing district lines for nearly 190 congressional seats.” Rove downplayed the role of dark money in the project, while exaggerating the extent to which unions and progressive groups had similar plans to control redistricting. (Sadly, it turns out, they did not.)

In eight short years, the scheme worked. Most journalists focused on Republicans taking back the House in 2010, but the most momentous developments of that year were the GOP gains at the state level. For example, Republican strategist Ed Gillespie, who ran and lost a race for Virginia governor last year, brought REDMAP to North Carolina in 2010. Republicans hadn’t controlled both houses of the General Assembly “since General Sherman,” a local politician quipped to The New Yorker’s Jane Mayer. Nevertheless, Art Pope, a wealthy businessman who had already served in the state’s House of Representatives and seeded many conservative groups, helped bankroll an assault on Democrats. Pope-funded groups targeted 22 legislative seats and took 18, winning control of both houses of the General Assembly for the first time since 1870. Overall, 22 state legislative chambers changed control in the 2010 election cycle—all from Democratic to Republican. Nationwide, the GOP won 720 seats that year, counting special elections, to control 54 percent—more than they had since 1928.

In 25 states, Republicans suddenly controlled the entire legislature, up from just 14 the year before. They also flipped governorships in 11 states, including Michigan, Ohio, Pennsylvania, and Wisconsin, where redistricting battles would prove brutal in the years ahead. Republicans already had a majority in the Virginia House of Delegates, but they gained nine seats in 2011, attaining a veto-proof majority. In 2012, when Obama won reelection, Democrats picked up a measly 168 statehouse seats and lost one governorship, in North Carolina, where Pat McCrory defeated Walter Dalton and promptly repealed the state’s Racial Justice Act.

Things only got worse in 2014, when Republicans took control of another nine state legislative chambers. They attained trifecta control of the statehouse and governorship in 23 states. In 2016, both parties picked up a few statehouses, but the number of divided legislatures dwindled to just three, giving the GOP trifecta control in 24 states.

As their numbers and power grew across the country, Republican state lawmakers set out to make life dramatically worse for Democratic voters, low-income people, workers, and women, imposing dozens of voter-suppression laws, restricting the rights of labor unions (in particular public-employee unions, a major source of Democratic funding), pioneering new abortion restrictions, and pushing through cutbacks to women’s-health programs as well as anti-LGBTQ legislation.

According to the Brennan Center for Justice, 23 states passed new restrictions on voting after the GOP’s statehouse takeover in 2010: 13 have more restrictive voter-ID laws in place, including six with strict new photo-ID requirements; 11 have laws making it harder for citizens to register; six have cut back on early voting; and three have made it harder to restore voting rights for people with criminal convictions in their past. Of the 11 states with the highest black turnout in 2008, seven put new voting restrictions in place (although North Carolina’s law was blocked by a federal court).

The anti-labor laws passed in GOP-run states have diminished Democratic voter participation—by design. Since 2012, six states—Indiana, Kentucky, Michigan, Missouri, West Virginia, and Wisconsin—have passed new “right-to-work” laws that allow workers to benefit from union representation without having to pay union dues. Some of those same states, like Wisconsin, have also limited public-sector unions’ bargaining power; in 2017, Iowa made that move when the GOP returned to power. As Sean McElwee has documented in The Nation, right-to-work laws have decreased the Democratic presidential vote share by 3.5 percent; Hillary Clinton lost Michigan and Wisconsin by 0.2 and 0.8 percent, respectively. But these laws also hurt Democrats on the state level. James Feigenbaum, Alexander Hertel-Fernandez, and Vanessa Williamson of the Scholars Strategy Network estimate that right-to-work laws decreased the seats held by Democrats in state legislatures by 5 to 11 percent.

This year, five Democratic senators are up for reelection in states that have become right-to-work since 2012: Joe Donnelly in Indiana, Claire McCaskill in Missouri, Tammy Baldwin in Wisconsin, Debbie Stabenow in Michigan, and Joe Manchin in West Virginia, which went right-to-work in 2016. The reduction in Democratic voting strength, thanks to laws enacted at the state level, will make their chances at winning reelection that much tougher in a year when Democrats must defend every seat in order to have a shot at gaining control of the Senate.

Perhaps the most reactionary new policies have come in the realm of abortion rights. In the years from 2011 and 2016, states passed as many abortion restrictions—288!—as they had in the 15 years prior. In fact, the limits enacted in those six years amount to a full quarter of the abortion restrictions passed in the 43 years since Roe v. Wade. According to the Guttmacher Institute, of the 10 states that adopted at least 10 new abortion restrictions in those years, which accounted for 60 percent of all new restrictive laws, all 10 were run by Republican governors with GOP statehouse majorities.

The redistricting that the new GOP majorities pushed through also had a devastating effect at the federal level. RealClearPolitics’ Sean Trende—far from a liberal—called Pennsylvania’s GOP-drawn map for US House districts “the gerrymander of the decade.” And it worked as intended right away: In 2012, even though Democrats won more than half of the state’s votes in US House elections and Obama won reelection easily, Republicans took 13 of the 18 House seats being contested. Michigan’s new congressional map, unveiled in 2011, has been compared by one election-law expert to a confectioner’s fantasy, “with districts swirling around Southeast Michigan like colors in a Willy Wonka lollipop.” Although Obama carried the state in 2012 by almost 10 points and Senator Debbie Stabenow won reelection by more than 20, Republicans took nine of the 14 US House seats up for grabs. In Wisconsin, Democrats went from a 50–45 edge in the State House of Representatives to a 38–60 deficit in 2010, and lost both the State Senate and the governorship. The GOP-gerrymandered maps drawn the following year meant that, while Republicans got less than half of Wisconsin’s US House votes in 2012, and while Obama defeated Mitt Romney in the state by seven points, Democrats wound up with only three of Wisconsin’s eight US House seats. (Courts have recently challenged the Wisconsin map, as well as those in Pennsylvania and North Carolina, which could help Democrats in all three states in 2018.)

As bad as all this news is, it may not be the worst of it. First, after the next two election cycles, the results of the 2020 census will be in, triggering another wave of House redistricting across the country. Although courts have pushed back on some of the most extreme maps, there’s little reason to believe that Republican line drawers won’t try to extend and consolidate the advantages the party has gained in recent years. If they prevail, the post-2020 maps could make the post-2010 maps look logical by comparison.

Second, Republicans have succeeded so wildly at their state legislative gambit that conservatives are on the verge of what was once just a fever dream. With the GOP in control of 32 statehouses, they need only two more to reach the two-thirds threshold required to call a constitutional convention, which would enable them to gut federal power on issues from taxes to guns to voting rights to abortion to labor and environmental regulation. That’s the goal of the conservative group Citizens for Self-Government, supported by Texas Governor Greg Abbott and Florida Senator Marco Rubio. Right-wing former senators Tom Coburn of Oklahoma and Jim DeMint of South Carolina are also constitutional-convention evangelists. “People are disgusted with Washington. They are ready to move power back closer to home,” DeMint told USA Today last year.

Democrats already have many reasons to focus on taking back state legislatures, but the prospect of a constitutional convention is what keeps many of them up at night. It’s one of the reasons that media veteran Michael Hirschorn helped create the People PAC, a coalition of media and creative professionals working to strengthen the anti-Trump resistance. Hirschorn spent months after Trump’s election trying to find the best points of leverage and finally settled on state races—at least partly because, if the Republicans pull off a constitutional convention, he says, “that’s game over.”

Democratic leaders undoubtedly deserve a heap of blame for this electoral carnage. Many activists criticize Obama and his political team for ignoring the party’s infrastructure and keeping his peerless campaign organization, Obama for America (which later became Organizing for America), focused on protecting the president’s brand and ensuring his reelection. After then–Democratic National Committee chair Howard Dean rebuilt the party infrastructure through the 2006 and 2008 election cycles, he was rewarded by losing his job in 2009. From the start, Obama seemed uninterested in rolling up his sleeves and figuring out what exactly a multimillion-dollar organization like the DNC should do. And he ignored complaints about Debbie Wasserman Schultz, the new DNC chair, for years, unwilling to face the blowback that her ouster might trigger, even as Schultz cozied up to corporate donors and allowed the party’s grass roots to wither.

Meanwhile, the Democratic Congressional Campaign Committee, the Democratic Senatorial Campaign Committee, and the Democratic Legislative Campaign Committee—as well as the state-party operations and legislative-caucus groups—all came to function as incumbent-protection committees. “Understandably, [state parties] are focused on protecting their members, even when they’re in the minority,” says Forward Majority’s Vicky Hausman. “But that means they’re not always willing or able to venture out and reach for the majority.”

In the end, however, the party establishment’s failure to tend to its grass roots, especially at the state level, doomed even this strategy. Along with the net 968 statehouse seats lost since 2009, Democrats lost the US House in 2010, the US Senate in 2014, and the White House in 2016. The roster of former Democratic incumbents who might still be casting votes in Congress for gun control, or a progressive tax plan, or to protect the Dreamers includes Wisconsin’s Russ Feingold and North Carolina’s Kay Hagan in the Senate, as well as Tom Perriello (VA), Steve Kagen (WI), and Mary Jo Kilroy (OH) in the House.

Belatedly, Democrats are realizing that without better organization and recruitment at the state level, the machinery that mobilizes new voters and holds on to those already committed has sputtered and, in some places, died. We are finally seeing a new wave of activity at the state level. A lot of it is untested, but much of it holds promise nonetheless.

There are two big groups with Obama ties playing on this turf: the National Democratic Redistricting Committee, led by former attorney general Eric Holder, and the statehouse-focused political-action committee Forward Majority, led by Obama for America veteran David Cohen and other Obama alums. Holder’s NDRC is targeting 10 states, including Wisconsin, North Carolina, and Georgia, with a combination of legal challenges to gerrymandering, ballot initiatives on redistricting, and material support for a still-undetermined number of individual candidates. One of the group’s main goals, says NDRC director Kelly Ward, is to make clear to black voters that “gerrymandering and voter suppression go together.”

Forward Majority will target more than 100 legislative races in at least eight states, including North Carolina, Pennsylvania, Michigan, and Wisconsin. Like the NDRC, the group is focused on states where gerrymandering has been extreme. It is also trying to bring the tools of the modern congressional campaign—social-media and SMS outreach, in addition to mail messaging, polling, and canvassing—to underfunded state races. “We’re looking for a set of races that are competitive, but where others are not playing,” says Forward Majority’s Hausman. “We tell people their highest return is at the state-legislature level. A small amount of money can go a long way.”

Emily’s List, long known for its work at the congressional level, plans to target at least 598 state races and has more than tripled the size of its staff supporting state and local candidates. In North Carolina and Pennsylvania, the group has worked with state parties and with outside activists to recruit robust slates that feature plenty of women. “We need to take this opportunity and momentum to expand our targets and compete to flip legislatures that may have seemed impossible before,” says Julie McClain Downey, director of campaign communications.

The smaller new groups that were active in Virginia are ramping up, too. Run for Something has endorsed 103 first- or second-time candidates in 33 states in the past 15 months, and co-founder Amanda Litman says that number will climb. The respected start-up Flippable—which raised $600,000 and backed 10 statehouse candidates in Virginia, Washington, Florida, and Delaware in 2017—is endorsing 100 candidates in nine states this year. They are focusing, in part, on districts won by Clinton where a strong Democrat is challenging a Republican, according to co-founder Catherine Vaughan. Flippable plans to start in Pennsylvania and Texas and move on from there.

Other venerable lefty groups are getting in on the action. “There is so much power in the states, and the Republicans have more or less run the table,” says Joe Dinkin of the Working Families Party, which began in New York but now has chapters around the country. The WFP got involved in Virginia in 2017, backing Lee Carter and several other progressives. In 2018, Dinkin says, “we’re going to be working with lots of progressive candidates—especially in races that Democrats don’t think are the most competitive.” The party is backing candidates in Florida, Nebraska, Colorado, Connecticut—and at home in New York, where, over the years, Democratic control of the State Senate has been subverted by defectors who caucused with the GOP.

For its part, the Democratic Legislative Campaign Committee is trying to learn from this new wave of innovation and escape its reputation for incumbent protection by partnering with Run for Something and Emily’s List. “Virginia showed us we could flip 15 seats in one state in a single day,” says DLCC director Jessica Post. Nobody thought that was possible a year ago, she admits, but the experience has convinced her that party organizations need to aim higher than they have in the past. In Virginia, for example, the Democrats more than doubled the number of candidates running for Republican-controlled seats, from 23 in 2015 to 54 in 2017.

Kelly Ward of the National Democratic Redistricting Committee agrees. Having assumed it would take two cycles, through 2020, to achieve many of the NDRC’s goals, she now says, “We think we should be embracing the momentum of 2018, and push that momentum as far as it can go.”

But the lessons from Virginia go beyond mere scale. The unexpected victories last year are a powerful sign that the party needs to be more ambitious in terms of gender and racial diversity. The winning Democrats in Virginia were stunningly diverse; the 2018 House of Delegates includes the chamber’s first two Latinas, first two Asian women, first out lesbian, first public defender, first AFSCME member, first social worker, first Democratic Socialist, and first transgender legislator. As these new members were sworn into office on January 10, Lisa Turner, the former political director of the DLCC, who worked with Virginia Beach Delegate Kelly Fowler, watched in awe. “I felt terrific to see that class, and see all those fresh faces,” she recalled. “Then to look over at the Republicans and see all those white men!”

Running a dramatically larger and more diverse slate of candidates also means that state parties will have to make room for outside groups to play a larger role. In Virginia, for example, the party lacked the resources to support all the new challengers, House Democratic Caucus leader David Toscano told me candidly last year. “It’s stretching our resources, and it’s stretching our thinking about how to support so many candidates,” he confessed.

“The big Virginia victory—15 winners!—was due to the outside groups,” Turner declares. “It would not have happened without them.”

Delegate Lee Carter, a Democratic Socialists of America activist, concurs. “I had a strained relationship with the state party, but I had a great relationship with the Manassas and Prince William Democratic Party folks and with all the regional staff. But my biggest support came from the coalition of outside groups—DSA, Let America Vote, Forward Majority, Indivisible NoVaWest, 31st Street Swing Left, the Sierra Club, NARAL, Planned Parenthood. It was a very interesting coalition.”

The folks at Forward Majority, one of the better-funded outside groups, are diplomatic about the tensions between Virginia’s House Democratic Caucus and some of the Forward Majority–backed candidates. “We went to the caucus and said, ‘OK, you’ve got your top 10 or so candidates,’” Obama alum David Cohen recalls, “‘so we’ll start with number 11 and work down.’” Forward Majority worked with Fowler and Carter, along with Dawn Adams, the first out lesbian elected to the House of Delegates, and progressive feminist college professor Debra Rodman, as well as a few candidates who came close but lost.

Virginia veterans also argue that issues matter—and not just the ones that establishment Democrats think are safe. Virginia Republicans have passed shockingly reactionary bills on abortion, health care, guns, and education. But since so many voters have lived for years in districts where there has never been a Democratic challenger, they were often unaware of the far-right stands their own representatives had taken. Forward Majority specialized in digital messaging that called out these reactionary policies. Rodman’s opponent, John O’Bannon, “voted to defund Planned Parenthood, led the effort to block Medicaid expansion in Virginia, and went on TV to profess his love for the president’s reckless efforts to repeal the Affordable Care Act,” says Ben Wexler-Waite of Forward Majority, whose ads highlighted that record.

In Fowler’s race for the House of Delegates, Christine Bachman, a lawyer and Moms Demand Action activist who threw herself into politics after Trump’s election, recalls that Fowler “started out eight points behind” incumbent Ron Villanueva. But in issue polling, “when we told voters he opposed Medicaid expansion, Kelly gained two points. When we said he voted to defund Planned Parenthood, she gained three. When we said he opposed gun control, it became a dead heat.”

Gun safety was a winning issue for many of the new candidates, even though the National Rifle Association is headquartered in Fairfax, Virginia. Of the 13 competitive races where Democratic candidates supported by the pro-gun-control group Americans for Responsible Solutions squared off against NRA-backed Republicans, the Democrats won 12. The three men at the top of the ticket—newly elected Governor Ralph Northam, Lieutenant Governor Justin Fairfax, and Attorney General Mark Herring—each received an “F” rating from the NRA; all of them won handily. (“And each of us is proud of our ‘F,’” Fairfax proclaimed.) These same factors may play out differently in deep-red states, but the stunning student activism since the massacre in Parkland may have changed the political calculus, not just in Florida but everywhere.

Likewise, despite the frequent reluctance of mainstream Democrats to broach racial issues, outside groups found Virginia voters open to engagement on the subject. Adrianne Shropshire’s BlackPAC worked to elect Fairfax, who is African American, and got involved in some down-ballot races, too. Polling showed the group that “for all voters of color, racial-justice issues, and the perceptible rise of racism, were equal to or more important than the economic issues,” Shropshire told me. “In fact, they were driving indicators of voter turnout.”

Between GOP gubernatorial candidate Ed Gillespie’s fervent support for Confederate monuments and his attacks on Virginia Democrats for supporting “sanctuary cities,” voters of color were energized, Shropshire said. And then came the white-supremacist marches in Charlottesville. “We heard a lot of concern about racial justice after the immediacy of Charlottesville,” she added. “About Trump, about hate crimes, about voting rights and voter suppression—those issues are huge to black women.”

Virginia’s rainbow of Democratic candidates, along with their willingness to engage tough issues of racial justice, helped boost black and Latino turnout—all the way to the top of the ticket. Public defender Jennifer Carroll Foy, who is black, campaigned on the need for criminal-justice reform, while Elizabeth Guzman crusaded to support Dreamers and other immigrants, documented and undocumented alike.

Shropshire and many others believe that the “reverse coattails” of the down-ballot Democratic challengers helped Fairfax win his race for lieutenant governor. Reed Shaw, the former deputy data director for Obama’s 2012 campaign in Virginia, presents a persuasive case that the down-ballot candidates helped Northam win, too: In deep-red precincts where no Democratic candidate ran, Northam outperformed the vote total of his predecessor, Terry McAuliffe, by 4 percent. But in deep-red precincts that featured a Democratic challenger, he eclipsed McAuliffe’s 2013 vote by 17 points. And in precincts considered flippable, Northam bested McAuliffe’s total by 40 points.

“Reverse coattails were real,” insists Forward Majority’s Hausman. “Northam was always going to do well in urban Virginia, in traditional Democratic areas, but diverse candidates increased votes for him elsewhere. We created more competitive districts.”

“We definitely saw reverse coattails,” says former DNC chair Howard Dean. “This was a groundbreaking election: We saw millennials, women, Latinos, African Americans, and Asians come out—the first mass election of the new Democratic Party.”

But if folks on the ground in Virginia did a lot of things right, we can also learn from what activists say was done wrong. Women and people of color are stepping forward to run for office in amazing numbers: Since Trump’s election, 34,000 women have contacted Emily’s List about running; Run for Something has heard from more than 16,000 millennials who want to be candidates; VoteRunLead, which has trained some 33,000 women in its 12 years of existence, has 38 candidates who are running for statehouse offices this year. But the Democratic Party’s recruitment and development mechanisms still have trouble recognizing and supporting this new cohort of politicians.

“State parties are very hierarchical—there’s a bias built in by men, for men,” says VoteRunLead’s Erin Vilardi. “Your rank comes with the time you’ve given to the party. And these women are not necessarily that into being Democrats, either. They’re pissed. They’ve been yelling. They’ve been involved in issues, but not necessarily in the party. So the party is not necessarily equipped to support the women who are running.”

“The formula has to change,” says Carroll Foy, who didn’t get the party’s backing in her primary but secured help after she won it. “We knew we weren’t the favorites of the establishment. But we showed that when minorities and women run, we win.”

Dean says the same is true of the new crop of millennial candidates. “These millennials aren’t necessarily Democrats,” he notes. “They’re anti-institution. And the state parties can be an incumbent-protection racket. They’re not bad people; they want to do the right thing. But they’re kind of a closed club.”

Forward Majority worries that state parties will overinvest in protecting candidates who survived the 2016 Trump wave. “If you held on in ‘16, you’re probably in good shape!” says Vicky Hausman. Christine Bachman, the lawyer and Moms Demand Action activist, points to polling from Virginia in early 2017 showing that some Democratic incumbents, and even some challengers, enjoyed a comfortable lead over their GOP opponents. “How can we become more nimble about reallocating resources to mid-tier and lower races when those top races become safe wins?” she asks.

David Toscano, the Virginia House Democratic Caucus leader, is familiar with the criticism. When I ask him a version of Bachman’s question—why didn’t the party allocate money away from the incumbents who looked pretty safe early on?—he answers quickly. “Look, you don’t get to 51 without making sure your incumbents are protected. I had other elections in my head,” he adds, meaning the one back in 2009, when Virginia Democrats held 44 seats in the House of Delegates. “We thought we had a run at the majority. But we spread ourselves too thin, and we lost seats that year.”

Lisa Turner isn’t convinced. “You gotta throw away the playbook,” says the former political director of the DLCC, who is now critical of the group and of the official Beltway approach to these races. Turner helped Kelly Fowler survive a fund-raising crisis and stay in the delegate race last August, and she has criticized Virginia party leaders for overinvesting in their incumbents and a relative handful of newcomers. She wants to see state parties and the DLCC put more people on the ground. “We also need to focus on the mentoring of new candidates. This is not a one-size-fits-all thing.”

Another major lesson from Virginia is that the tactics must evolve with the time. Many of the 2017 candidates say they were given an antiquated template by party leaders: Spend a certain number of hours per day calling donors; invest in polling; pay for mailers. Some were steered to the same vendors for polling, fund-raising, mail, and campaign management. The candidates who balked paid a price.

“The state party was mad I wasn’t using the same vendors,” says Lee Carter. Jennifer Carroll Foy says that she got pushback regarding her decision to go door-to-door and talk issues with the voters directly: “We believed in having conversations at the front door, but the old mentality was about mailers and money.”

Bachman agrees that the focus on “mailers and money” is outdated and should be replaced with more emphasis on digital advertising and social media. “We don’t think [candidates] should have to do so much call time” for money, she says. “We want them out in the district.” Bachman is most excited about “the incredibly diverse creatives” who donated their time and talents to produce video for Virginia’s newcomer candidates—groups like the Arena and the People PAC and One Vote at a Time, all of which are ready to move on to where they’re needed in 2018.

After Trump’s election, “a lot of us said, ‘Holy shit, we may not have a democracy anymore,’” recalls Michael Hirschorn of the People PAC. He began meeting with “journos, creatives, politicians,” talking about what to do in the wake of Trump’s victory. Then Bachman sold him on the importance of state races and getting involved in Virginia. “The candidates are people who tend not to be professional politicians—they have the fewest resources, but your dollar goes so much further…we can do this pretty cheaply,” Hirschorn notes. He connected with Sarah Ullman of One Vote at a Time, who was doing videos for three of the Virginia insurgents. “We told her to stick around a few more days and we would roll some more candidates through the studio.” Together, the groups ultimately produced videos for 19 candidates, including one incumbent.

These video groups made a crucial difference, activists say. “We found that the personal narratives were huge: People struggled with telling their stories,” BlackPAC’s Shropshire told me. Turner and Fowler, who worked with the Arena, say they were able to cut the videos in different ways for different audiences and use them on social media cheaply and effectively. “It was a phenomenal resource,” Turner says. Hirschorn remains inspired. After Virginia, he realized, “there’s no reason we can’t do this in all 50 states.” Christine Bachman is so sold on the opportunity that she’s gone to work as political director for the People PAC and as an adviser to One Vote at a Time.

And so, assuming that Democrats heed reasonably well the lessons of Virginia, what can they achieve in statehouse races this year, with 6,066 seats in play? For starters, there are about 400 state legislative seats held by Republicans or independents in districts that Hillary Clinton won in 2016. On a more granular level, in six state chambers, Democrats are within 12 seats of wresting control from the GOP. It would take only one pickup each in Colorado, Minnesota, and Maine to flip the State Senates there; three pickups to do the same in New Hampshire, Arizona, and Wisconsin. Most of the marquee groups, including Forward Majority and the DLCC, are targeting Wisconsin and Michigan, at least in part because they so unexpectedly flipped to Trump in 2016. The deliberate erosion of union power makes grassroots Democratic organizing there more crucial, albeit more difficult.

Larger wins are possible too, activists argue. Many groups, including Forward Majority, are focused on Pennsylvania, where Democrats need 21 seats to take back the State House of Representatives. Already, at least 10 Republicans there have succumbed to the same Trump-related retirement flu we’ve seen in Congress. “It looks like it’s going to be a war zone,” State Representative Gene DiGirolamo, a moderate Republican, told The New York Times in February. There are 19 seats held by Republicans in southeastern Pennsylvania districts that Clinton won; Democrats aren’t likely to pick up all 19, but there are also opportunities in other parts of the state—as the recent upset victory of Democrat Conor Lamb, in a congressional district that went for Trump by 20 points, has shown.

Democrats are also fielding a remarkable slate in North Carolina, where the party has recruited a candidate for every single statehouse seat for the first time in memory. Democrat Roy Cooper won the governorship in 2016, and the party is now focused on at least 60 legislative districts where Cooper either won or came close that are currently represented by Republicans. Of the 170 candidates recruited there, 77 are women and 71 are people of color. “To break the GOP supermajority, we need to pick up either four seats in the House or six seats in the Senate (or both),” says Robert Howard, the state party’s communications director. “To win back the chambers, we need 16 in the House and 11 in the Senate.”

The parallels between North Carolina and Virginia are many. Both states have seen explosive suburban growth due to immigrants, who are turned off by the GOP’s far-right agenda. And both states are now led by popular Democratic governors who are committed to fighting gerrymandering and electing more Democrats to the State Legislature. North Carolina has a similar proportion of African Americans in the electorate, and it also boasts the Rev. William Barber II’s Moral Mondays movement, “a grassroots ecosystem that actually pioneered much of the resistance work we have seen since Trump’s election,” says Bachman, who plans to be active in North Carolina’s statehouse push this year.

State Representative Graig Meyer, who has been in charge of candidate recruitment since 2016, told me: “I’ve been very impressed by the caliber of candidate stepping up this year. Some of them are people who told me in 2016, ‘I’m just not interested in politics; I’m an activist.’” Trump’s election “was a tipping point—I’m finding a lot of women inspired by the Clinton campaign who wanted to do more.” Meyer added that North Carolina’s candidates are diverse not only in terms of race and gender, but in terms of background. They include a statewide Parent-Teacher Association president, a local NAACP leader, a Moms Demand Action activist, an opioid-abuse counselor, and a man convicted of armed robbery in his youth who went on to become a businessman and is now a popular small-town mayor.

Another target this cycle will be Georgia, where both Forward Majority and Eric Holder’s National Democratic Redistricting Committee will be active. Assuming that Georgia House of Representatives leader Stacey Abrams, who is black, wins her May primary and becomes the Democratic nominee for governor—she has a tough challenger in Stacey Evans, in a race that has already been racially divisive—the state will certainly be a priority for BlackPAC and Higher Heights, which focuses on the political advancement of black women. Our Revolution, an independent offshoot of Bernie Sanders’s 2016 campaign, plans a big push for Abrams; the group’s director, Nina Turner, helped kick off the Georgia progressive’s campaign back in June of last year. In March, Sarah Ullman of One Vote at a Time began work on videos to capture Abrams’s historic campaign.

Florida, where Democrat Margaret Good won a seat this year in a district that went for Trump by five points, “is probably going to be a multicycle play,” says Daily Kos’s Carolyn Fiddler. But the political calculus in the state has undoubtedly shifted since the massacre at Marjory Stoneman Douglas High School in affluent Parkland. Students left their classmates’ funerals and headed to the State Capitol in Tallahassee, armed with a precocious political sense that the statehouse was where the NRA’s power was greatest. Forward Majority has tagged Florida as a potential priority state; it expects to have more company there now.

But activists see opportunities all over the map. Ohio Democrats announced that they will run candidates in every state legislative district for the first time in six years. In Arizona, the DLCC says, 114 Democrats—including 51 women and 55 people of color—have filed to run for the State Legislature; that number can still climb. In Texas, Democrats will run more legislative candidates than they have since the 1990s, contesting 133 out of 150 State House districts, plus 14 of 15 State Senate districts; among the candidates are more than 80 women. There’s much hope that the slate will provide reverse coattails for Democratic Congressman Beto O’Rourke, who is challenging Senator Ted Cruz and is only eight points behind in the latest polls. Forward Majority and Flippable are both looking to Texas and Georgia as potential priority states.

Even red states that haven’t shown up yet on the heat maps of Democratic activists are fielding promising statehouse slates: Indiana Democrats are running in 84 of 100 legislative districts, a record in this millennium, Mother Jones reports. In Kentucky, over 60 women are running for the House or Senate, according to the state Democratic Party. Contesting 93 of the 100 seats in the lower chamber, Democrats haven’t put up this many candidates in the Bluegrass State since 2000. The party is on the rise even in deep-red states like Alabama in the wake of Doug Jones’s Senate victory: Democrats are running candidates in 74 of the 105 House districts, up from just 56 in 2014.

Writ large, these statehouse races represent not just the chance to control redistricting, or to roll back restrictions on voting rights and women’s health, or to have “reverse coattails” contribute to flipping US House or Senate seats or governor’s races. They also offer an opportunity for a diverse army of progressive reformers to take over the Democratic Party itself. Many of the Democrats’ state-party structures are moribund. In Virginia, women and people of color like Jennifer Carroll Foy, Kelly Fowler, Kathy Tran, and Hala Ayala, and smart Democratic Socialists like Lee Carter, are infusing new political and legislative energy into their caucus. Not only did these new Virginia lawmakers propel the expansion of Medicaid; they also helped push the threshold for felony larceny from $200 to $500; Carroll Foy wanted the limit at $1,000 but praises $500 as a start. Also in February, progressive Democrats bucked their own governor to block the energy titan Dominion from essentially double-dipping when passing on the cost of infrastructure investments to consumers. When it became obvious the Democrats had the votes, Republicans joined them, and the measure passed almost unanimously.

Of course, the final lesson that Virginia has for all of us is this: Every vote counts. Ask Shelly Simonds, the Democrat who tied with incumbent David Yancey last November, only to lose the seat in a bizarre game of chance. Simonds intends to challenge Yancey again, and two black Democrats who also lost after recounts—pastor and educator Joshua Cole, and Air Force veteran and small-business owner Donte Tanner—have announced they’ll run again in 2019. For Virginia Democrats, the work isn’t over—and never will be.

States have long been termed the “laboratories of democracy,” but in the past decade they’ve become an experiment in what happens when democracy withers, overcome by dark money, conservative chicanery, and Democratic passivity. But now the states may be places where democracy comes alive again. Part of this democratic revival has been sparked by the resistance to Trump, but every single state activist I spoke with stressed that what’s really mobilizing their efforts is a focus on local issues. “You only run for these offices because you care about your neighbor,” says North Carolina’s Meyer. In Virginia, progressives and conservatives found common ground on traffic, education issues, even guns—and ultimately compromised on the Medicaid expansion, too. Sanders supporters locked arms with Clinton diehards and put out destructive fires locally. These new activists are reweaving a social fabric frayed by decades of progressive retreat and conservative assault; they are what the Rev. William Barber has called “repairers of the breach.”