“Republican candidates in 2018 might not be as flawed as Roy Moore, but the battleground districts and states won’t be as Republican as Alabama,” says the Democratic strategist Jesse Ferguson. “This race had started to close before the allegations came out because of backlash against President Trump … and one of the keys that put us over the top was a coalition of organizing that included the DNC and others.”

The DNC, for its part, is emphasizing a commitment to the grassroots. “The new DNC is all about talking to people in every zip code, building relationships in every zip code,” Perez told reporters on Wednesday. As the party seeks to repair its battered image, Perez is also trying to prove that it has learned from its mistakes. “In the past, the Democratic Party all too frequently took voters for granted,” Perez said, adding that those days “are in the rearview mirror” and that “the new Democratic Party is organizing everywhere.”

One of the most pressing challenges for the DNC is to win back the trust lost in the last election when hacked emails showed then–Chairwoman Debbie Wasserman Schultz disparaging Bernie Sanders, a Democratic primary candidate. As new progressive organizations have cropped up to channel the frustration and anxiety of Democratic voters in the aftermath of the presidential election, the DNC faces pressure to prove that it can also be an effective conduit for pent-up grassroots energy.

The DNC invested close to $1 million in the Senate race in Alabama, all of which helped fund voter-contact and organizing efforts to drive up black and Millennial voter turnout. A surge in black-voter turnout helped propel Jones to victory on Tuesday evening.

A broad array of liberal organizations were also working to get out the vote for Jones in the race, including progressive groups such as MoveOn, Democracy for America, and the Working Families Party. MoveOn volunteers sent thousands of text messages encouraging people to vote, while Working Families Party volunteers helped recruit people to phone bank and knock on doors in Alabama.

“I think the real story is that the DNC and traditional institutions in the Democratic Party are not the only game in town. There are a lot of outside groups doing really important work to tap into grassroots energy and activism,” says Joe Dinkin of the Working Families Party.

National Democrats kept a low profile in the race. The DNC did not publicly announce the extent of its investment in the race until the day of the election in Alabama as part of a strategy to keep the focus on Jones and his campaign. “We operated below the radar screen because that was in the best interest of the race. But make no mistake about it, we were below the radar screen, but we were present,” Perez said on Wednesday.

That could be viewed as further evidence that the Democratic Party’s brand is damaged. A poll released in April found that a majority of the public thinks the Democratic Party is out of touch with the concerns of average Americans, a data point that alarmed some Democrats in Congress and highlights the image problem the party has grappled with in the wake of Trump’s election, even as the president himself remains historically unpopular.