On Tuesday night, two major Midwestern prosecutors lost their jobs after provoking nationwide rage with their handling of cases in which police officers killed unarmed young black people. In Illinois, the loser was Cook County state’s attorney Anita Alvarez, who waited 13 months to bring charges against the Chicago police officer who shot Laquan McDonald 16 times in October 2014. In Ohio, it was Cuyahoga County district attorney Tim McGinty, who oversaw grand jury proceedings that led to no charges being filed against the officers responsible for the death of 12-year-old Tamir Rice.

Together the two results represent a major victory for the Black Lives Matter movement, whose organizers have now decisively demonstrated their ability to mobilize voters and change the direction of local politics. And while these two races were, technically, only Democratic primaries, the two candidates who won them are expected to take office with minimal or nonexistent opposition after the fall’s general election.

It’s rare for incumbent prosecutors to be voted out of office. According to one study, they win re-election 95 percent of the time, and typically they run unopposed. This is in part because most voters just don’t pay attention to prosecutor races, and usually don’t have a vivid sense of the office’s powers. As one local district attorney told me last year after completing a successful campaign, “Most people don’t know what the district attorney does.” In Cook and Cuyahoga counties on Tuesday, Democratic primary voters clearly had stronger opinions than usual about the work of their prosecutors—and they decided that they didn’t want Anita Alvarez or Tim McGinty doing the job anymore.

The challengers in the two races couldn’t be more different. In Cleveland, McGinty was up against one Michael O’Malley, who served as a deputy to McGinty’s predecessor. Though O’Malley used the Tamir Rice case against McGinty with enthusiasm, he took a restrained, cautious stance on it, criticizing McGinty for his approach to the grand jury proceedings but refusing to say whether he believed one or both of the officers involved had broken the law.

In Chicago, it was a different story. Alvarez’s challenger was Kim Foxx, an unabashedly progressive candidate who spoke without equivocation about holding police officers accountable when they kill innocent people. Foxx, who is black and grew up poor in Chicago, was unsparing in her assessment of Alvarez’s handling of the Laquan McDonald case. In an interview with Slate last fall, she called the case a “slam dunk” that Alvarez should have dealt with quickly. “This wasn’t difficult,” Foxx said. “This was a case that really just sits in your lap. It is a false narrative to suggest that this case was so highly complex that it takes 13 months.”

Foxx, who won by a huge margin Tuesday night, benefited from a highly organized and relentless opposition campaign against Alvarez staged primarily by young activists. Leading up to Tuesday’s vote, supporters of Black Lives Matter buffeted Alvarez with one protest after another: On Feb. 17, her speech at the University of Chicago’s Institute of Politics was cut short when members of a group called Black Youth Project 100 started chanting “We will not let Laquan be covered up!” The following week, activists interrupted a forum with Alvarez and Foxx by standing up and counting to 16—a reference to the number of bullets that killed McDonald. The catchphrase “Bye Anita” showed up on posters and T-shirts and, of course, as a hashtag on Twitter.

Alvarez was cast by activists as an unprincipled cop-coddler who prioritized her working relationship with the Chicago Police Department over truth and justice. Foxx undoubtedly got a significant lift from the efforts to unseat her opponent.

It’s worth noting that, as extraordinary as the results in Chicago and Cleveland seem, the incumbents lost the way incumbents always lose in prosecutor races: They succumbed to scandal. Typically, that means losing to a challenger after a high-profile case in which you failed to secure a conviction or an embarrassing controversy that put your name in the paper. As Wake Forest University School of Law professor Ron Wright told me in an interview last year, “It’s always about last year’s big, newsworthy case that went badly. Or it could be about personal misconduct in office—sexual harassment of a worker in the office, or some kind of salacious personnel dispute going on. Those are the kinds of things that get covered in the news in cases where the prosecutor ends up losing.”

In one sense, then, Tuesday’s results are consistent with history. But what appears to be changing from the law-and-order days of the recent past is that, in 2016, the scandal that can get you bounced out of office as a prosecutor involves not being hard enough on cops.

There’s something else, too: Kim Foxx ran on a comprehensive criminal justice reform platform, not just on the Laquan McDonald case. Foxx put herself forward throughout her campaign against Alvarez as a candidate who believes the justice system puts too many black and Latino men in jail and prison, and sees prosecutors as key figures in the push to end mass incarceration.

Alvarez’s political opponents also kept the bigger criminal justice reform movement in mind, taking aim at her record on juvenile justice, which has been marked by an enthusiasm for filing aggressive charges against kids; the role her office has played in locking up nonviolent and low-level drug offenders; the racial disparities in Cook County arrest rates for marijuana possession; and the defensive attitude she has sometimes taken in addressing possible wrongful convictions.

In her Slate interview, Foxx described working under Alvarez in the Cook County prosecutor’s office earlier in her career and feeling pressure to charge more aggressively than she thought was right. “With the state’s attorney, [the mandate] was: Charge high on everything. Just charge it,’” Foxx said. “And to me that’s not justice. … The idea was, you charged the highest offense and it would work itself out later.”

Instead of taking that muscular approach, Foxx promised to divert drug offenders and the mentally ill into treatment programs, dismantle the so-called school-to-prison pipeline by decriminalizing various behaviors that get kids arrested in their classrooms, and agitate for legislation that would “provide a more fair justice system that can keep communities safe without filling our prisons with Cook County residents who should not be there.”

Foxx’s stance on justice policy alone likely would not have been enough to win her the campaign, however. It was the high-profile McDonald case that helped her attract financial support from a national donor like George Soros, an endorsement from John Legend, and the support of young people around the city who might have otherwise never heard of her. Still, by focusing on issues beyond police accountability, Foxx’s campaign highlighted the immense power that prosecutors wield in the criminal justice system every day, not just when they’re facing controversial choices in news-making cases.

As I’ve discussed previously with help from criminal justice experts like John Pfaff and W. David Ball, local prosecutors in the United States enjoy an underappreciated amount of discretion when it comes to making charging decisions and negotiating plea deals. Their priorities, attitudes, and values matter, and Tuesday night’s surprising results in Cuyahoga and Cook Counties—along with the election of Scott Colom in Mississippi last fall—suggest that voters might be starting to understand that. If this turns out to be true nationwide, not just in places where prosecutors have dealt publicly with controversial police killings, it could be more transformative than any federal law Congress could ever pass.

In the meantime, the victory of Foxx over Alvarez and O’Malley over McGinty will go down as a condemnation of prosecutors who are perceived to be soft on cops. The question now is how other prosecutors around the country will respond to that lesson, and what, if anything, voters in their jurisdictions will demand of them.