For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Nico LaHood is the kind of district attorney who drives criminal justice reformers nuts. In his first term running the prosecutor’s office in Bexar County, Texas, which includes San Antonio, LaHood used his office to promote his anti-vaccination views, float Islamophobic conspiracy theories, and threaten to ruin his critics’ livelihoods. He personally prosecuted death penalty cases—an unusual move for a district attorney—and offered support for SB4, the new state law that imposes criminal penalties on local law enforcement agencies that limit cooperation with federal immigration authorities.

And as of today, he’s a lame duck. On Tuesday, LaHood was swept out of office in the Texas Democratic primary by San Antonio defense attorney Joe Gonzales, whose law firm LaHood once threatened to “shut down” after the firm’s attorneys accused LaHood’s office of having a conflict of interest in a murder case. (LaHood denied making the threat, but a witness—the judge in the case—confirmed it.)

“When we knocked on doors, people were not interested in the federal election…What the issue was is, ‘My husband is locked up—we can’t afford $1,200 bail.'”

Tuesday’s outcome could have sweeping ramifications for criminal justice reform in one of the nation’s most populous counties. Among other things, Gonzales has promised to end cash bail for certain crimes, a practice that often puts low-income residents who have yet to be convicted of a crime behind bars indefinitely or forces them to pay exorbitant rates to bail-bond companies.

But Gonzales’s victory also has important national implications. Bexar was the latest front in an effort to focus national progressive organizing energy on oft-overlooked district attorney races. In his bid to unseat LaHood, Gonzales received nearly $1 million from a political action committee associated with the liberal financier George Soros, who has funded numerous district attorney challengers in a backdoor effort to end the death penalty. (Nonfederal races in Texas allow for unlimited donations.) He also picked up support on the ground from two progressive organizations—the Real Justice PAC and the Texas Organizing Project—that have placed an emphasis on DA races.

In 2016, the Texas Organizing Project, a community organizing outfit in the mold of ACORN that focuses on African American and Hispanic residents, invested heavily in the DA race in Harris County, Texas, which includes Houston. TOP’s candidate, Kim Ogg, ran on a platform that included ending cash bail and halting cooperation with Immigration and Customs Enforcement.

“What we found in the Kim Ogg race was when we knocked on doors, people were not interested in the federal election,” says Brianna Brown, the organizations’ deputy director. “Trump, Hillary—that wasn’t what it was. What the issue was is, ‘My husband is locked up—we can’t afford $1,200 bail.’” Ogg won, and in the process, Democrats swept every countywide office in Harris County.

“This is a natural extension of that work,” Brown says.

In Bexar and Dallas County (where their 2018 efforts were unsuccessful), TOP teamed up with the Real Justice PAC, a national organization run by a group of former Bernie Sanders campaign staffers. After the 2016 election, Real Justice PAC founder Becky Bond, who helped build Bernie Sanders’ national volunteer network, was intrigued by the idea of county prosecutor races and decided to focus on those campaigns.

“About 80 percent of district attorneys, when they come up for election, no one challenges the incumbent,” Bond says.

Her group’s first major effort took place last year in Philadelphia, where activists worked the streets for Larry Krasner, a defense attorney who supported Black Lives Matter and promised to shake up the drug war and the policing system. With support from an army of national progressive organizers, Krasner dramatically increased turnout and easily won his primary despite being an outsider in a machine city. Since taking office, he’s implemented a series of reforms, including eliminating cash bail for low-level offenses—such defendants could still have to pony up if they fail to show up for their court date—and halting prosecution of low-level drug offenders.

The Krasner effort caught the attention of the activist and writer Shaun King, and he and Bond, along with other Sanders campaign veterans, decided to team up for a more ambitious schedule of races in 2018. Real Justice PAC began working on the races in Dallas County and Bexar in January and spent about $250,000, all on field efforts. TOP and Real Justice PAC worked closely together, with dozens of paid organizers knocking on tens of thousands of doors.

Tuesday’s results were only the beginning of a long year of intense down-ballot activity. The ACLU, which does not endorse candidates, is planning its own national “voter education” campaign centered around DA races in at least a half a dozen states. For now, Bond and Real Justice PAC are eyeing races in San Diego, Baltimore, Boston, North Carolina, and the San Francisco Bay Area.

“We’re gonna do what it takes to raise the money we need to fight in every single one of these,” Bond says.

Gonzales, for his part, still has to win another race. He’ll face Republican Tylden Shaeffer, another defense attorney, in the November general election.