“We shocked the world again,” DeJuana Thompson said.

She had joined a group of young black Alabamians last Tuesday night in Birmingham to watch the election results roll in. At the end of the night, the Associated Press called the Senate special election for Democrat Doug Jones—but the loudest cheers were reserved for the returns from black communities throughout the state. Even after the race was called, the results from the state’s “black belt” continued to roll in. In county after county, black voters turned out at a rate higher than their share of the population, in some places at levels approaching the numbers seen in the 2016 general election.

The question at the beginning of the night was whether a disgraced former state chief justice might still win enough votes to give the GOP another Senate seat. The story at the end of the night was that black voters had come to the polls with unexpected and unheralded zeal and imposed their will on Alabama. The question the next day was just how they’d done it, even against the inertia of voter suppression and Republican domination in a racially polarized state.

It’s a question that, like the Senate race itself, has drawn national attention. Democrats, who hope to recapture the House and Senate in 2018, are trying to understand their unexpected success in Alabama so that they can replicate it next year. But it was painstaking, careful organizing by black organizations that seems to have made the greatest difference—and black activists are drawing their own lessons from their successes in Alabama, as they seek to empower their communities.

* * *

“I remember right before the polls closed, I sat down and I felt good because the one thing I did know was that we left it all out there,” Thompson told me. Woke Vote, the collection of students and church-going activists and voter organizers she founded, had been working to bolster black turnout long before the Senate race gained national attention. As the results she’d hoped for materialized, she said, it took her back to the euphoria in black communities after the election of Barack Obama in 2008. “I started to get somewhat emotional because it was a similar feeling.”

The effort to turn out black voters in Alabama differed from previous campaigns, Thompson said. Unlike traditional get-out-the-vote campaigns implemented by Democrats in key African American communities close to elections, many of the moving pieces in the Alabama election were funded by entities other than the party or the candidate’s campaign, and had been proceeding in stealth for months. Indeed, Woke Vote’s focus was only peripherally about Jones. “This was a completely independent effort that was focused on the idea of what happens when you resource black people with the goal of turning out black people,” Thompson said. “They really connected with this idea that we had black power, and that black power could be shown through the vote.”

Jones’s campaign spent relatively few dollars on actively courting black voters, and often chose not to make explicit racial appeals for fear of alienating rural white voters. Instead, a patchwork of groups like Woke Vote raised funds through a variety of local and national donors, using those funds to canvas black communities in the state for months. They focused not just on single-candidate fliers and door-knocking for one election, but on empowering voters and improving voter literacy in ways that could be sustained through future elections.

Woke Vote centered its efforts on potential sites of latent black political power, including historically black colleges and universities and black churches. Thompson bet that her tiny group of organizers could use those institutions as force-multipliers, turning each potential new voter into an organizer. By installing student organizers in places like Alabama A&M University, Alabama State University, and Tuskegee University and the string of influential churches in black communities, Woke Vote secured pledges from members not only to vote, but to bring people with them to the polls.

One national organization that helped fund groups like Woke Vote early in the Alabama black turnout effort was BlackPAC, an independent organization dedicated both to fostering candidates with ties to black communities and to sustained, meaningful engagement with black voters. BlackPAC’s model of engagement with black voters attracted significant buzz after it poured $1.1 million into Virginia this year—and its investment appeared to increase black turnout, putting more Democrats into the state legislature and Ralph Northam into the governor’s mansion.

BlackPAC’s executive director Adrianne Shropshire argued that the results in Alabama reflected similar efforts. “We knocked on over half a million doors,” Shropshire said. “Those conversations weren’t just dropping a piece of literature at their door … our canvassers in many instances told people what they needed to go do to get ID if they needed it.” One key strategy that BlackPAC found especially useful was providing funds to pay organizers rather than relying on volunteers, a tactic that helped offset the strain and demands of canvassing rural and hard-to-reach communities in the state.

In addition to Woke Vote, the other major grassroots partner for BlackPAC was the Black Voters Matter Fund, a group led by LaTosha Brown, a Selma native. In the run-up to the election, her group raised money from a collection of donors, provided dozens of grants to smaller get-out-the-vote organizations, organized transportation to the polls, and printed thousands of pieces of voter literature.

Brown found a black community that was energized from the start, a far cry from depictions of black apathy and stifled energy from several national outlets in the weeks before the election. “They never could see black people in Alabama, in a highly conservative racially polarized state,” she said. “They never could see our power, even when we did.”

One thing that outsiders seemed to get wrong: Black voters in Alabama knew full well who Republican candidate Roy Moore was, and knew about his Lost Cause-proclivities and racial dog-whistle act long before numerous women came forward to allege sexual assault and harassment in November. And, after a year marked by a resurgence of violent white supremacy, black voters in the heart of the old Confederacy felt uniquely threatened.

“I think what happened in this election is a couple things,” Brown told me. “There was a perfect storm. A national element of Trump and the resurgence of this white conservative overtly racist rhetoric. We can see it. We can smell the rain coming. And you don’t have any choice but to beat that back.”

Still, converting that energy into turnout was not simple. Alabama is one of the hardest places in the United States for black people to vote, and activists have lamented that but for the state’s penchant for voter suppression, the final numbers for black turnout would have been even higher. The week before the election, Scott Douglas of the Greater Birmingham Ministries wrote, in an op-ed for The New York Times, about the scope of Alabama’s restrictive voter-ID and felony disenfranchisement laws, calling them a naked attempt to suppress the voting rights of people of color.” This year, groups like the NAACP Legal Defense Fund estimated that over 100,000 people in the state lacked proper ID, and that as much as 15 percent of the black voting-age population had been disqualified by way of felonies and the state’s archaic “moral turpitude” laws.

In addition, according to my colleague Brentin Mock, black voters faced a number of legally questionable barriers on election day. In 2016, Alabama moved 340,162 voters to its inactive-voter list; such voters are supposed to be able to re-identify themselves and cast ordinary ballots, but the LDF received reports that some were denied the chance to vote or asked to cast provisional ballots. Some majority-black precincts reported long lines and faulty voting equipment.

Alabama’s black activists prepared for such contingencies. BlackPAC mobilized a group of lawyers who bounced around precincts and local courts on election day. Additionally, grassroots organizers focused heavily on making sure black voters could meet voter-ID constraints, and launched campaigns to help ensure access to proper IDs months ahead of the election.

They also expanded the size of the electorate itself. Activists like Kenneth Glasgow and the Ordinary People Society have spearheaded efforts over the years to fight disenfranchisement in Alabama, which up until this year retained vague and extensive restrictions on voting for people with felonies. “I went on this campaign starting in 2003 where I started going to the local jails within the vicinity,” Glasgow said. “Once we become conscious that black citizens are being remade into three-fifths of a citizen again, then we can become organized.”

Glasgow’s opportunity came this May, when Governor Kay Ivey signed a law formally defining “crimes of moral turpitude,” a previously vague category that had convinced thousands of black Alabamians that they were ineligible to vote. That clarification opened up the ballot to thousands, and Glasgow estimates his group signed up somewhere between five and ten thousand voters with felonies as a result. In the weeks before the elections, the Ordinary People Society also canvassed jails—where people without felonies being held do have the right to vote absentee.

Moore, in response, tweeted that “Democrat operatives in Alabama are REGISTERING THOUSANDS OF FELONS all across the state in an effort to swing the US Senate election to Doug Jones!” It turns out that he was right, in a way.

“Can’t one organization or group say they were responsible for everything,” Glasgow told me. “But [Jones] won by what 20,000 votes? And we signed up almost 10,000 voters. So you can do the math.”

Other groups on the ground told me that the threat of restrictions on voting actually helped give black voters something to rally around. “We know we have to overperform and overcompensate in order to succeed, because there’s so many barriers to success in voting,” Brown said.

In her reckoning, GOP dominance, voter suppression, and the stubborn support for Moore among white voters in the state helped revive the kind of black political entities originally built in the state to grapple with Jim Crow. “The black political infrastructures in these places had to be so powerful because you had to keep people from killing you,” she said.

That infrastructure was never a top-down operation, and the results in Alabama reflected that. Even below the level of organized grassroots efforts, people like Lowndes County resident Perman Hardy helped drive rural black voters to the polls. “Anybody who needed a ride, we provided one with a call,” said Ben Eaton, president of the Black Belt Citizens in the tiny municipality of Uniontown. His organization drove hundreds of miles through the black belt, operating an election-day ride-sharing service in analog. It was the efforts of dozens of groups like these that combined to boost turnout last Tuesday.

All of the activists and organizers with whom I spoke insisted that the election was an expression of political power and agency by a group often forgotten or ignored by the party. “It’s really offensive when the Democratic Party or any other group comes in this particular space and takes credit for what’s happened,” Brown told me. “I do believe that we’re on the precipice of a black political renaissance in this country. And it’s cyclical. It comes in 30 and 40 years. It’s time.”

DeJuana Thompson put it more bluntly: “This right here, what we’re doing? This is about black people.”

Still, like the results in Virginia, strong black turnout in a special election in an off-year in Alabama provided Democrats with a glimpse of political possibility stirring in the black community. Nine years after Obama’s election, politicians still struggle to grasp black voters, often speaking of them purely in terms of their disaffection or their success or failure to wield their votes to save other people. Democrats have swooped in with GOTV schemes on the eve of elections, only to be beaten back, and have been baffled by the black turnout question in elections since 2014. Even in the Trump era, faced with Klansmen and Nazis marching through towns, politicians have puzzled over how to get black voters to the polls.

But there is an opportunity, for whichever party or candidate has the wherewithal to seize it. The lesson of Alabama is that those who wish to harness the energy of the black electorate would do well to empower the levers of black power that are already operating on their own.