During Democratic primaries on Tuesday, voters sent a strong message to the prosecutors responsible in the cases of Laquan McDonald and Tamir Rice. Both the Cook County State’s Attorney in Illinois, Anita Alvarez and Cuyahoga County Prosecutor Tim McGinty in Ohio were defeated by opponents in the democratic party.

The downfall of both prosecutors are a win for Black Lives Matter and other activists groups who became involved because of high-profile cases where prosecutors did not seek indictments for police officers who killed unarmed black youth, despite holding enough evidence to charge them with murder.

Young organizers can take pride in Anita Alvarez's loss tonight. They said #ByeAnita all the way to the ballot box. https://t.co/opARnOEnjl — Black Youth Project (@BlackYouthProj) March 16, 2016

In Illinois, Kim Foxx defeated Anita Alvarez, the two-term state’s attorney who held onto evidence of police brutality in the police shooting death of Laquan McDonald for over a year before publicly revealed dash cam video forced the arrest of the Chicago police officer Jason Van Dyke, who fired 16 shots into the 17-year-old.

According to the latest reports, Foxx is leading by 58% of the vote, while Alvarez managed to obtain 28%. A third contender, Donna More received 13%.

In the city, Foxx won in predominantly black and Hispanic wards on the city’s West and South Sides, and the ethnically diverse North Side lakefront wards. Alvarez scored well in wards with a white voter base on the Northwest Side, South and Southwest Sides where large numbers of police, firefighters and city workers reside, according to a breakdown of primary results by Chicago Magazine.

“Our struggles here are very real,” Foxx, an African American woman from Cabrini-Green in her victory speech Tuesday. “The need to rebuild a broken criminal justice here in Cook County is not work that should be taken lightly.”

Kim Foxx says her election isn't just about saying #ByeAnita, but turning the page.https://t.co/HSiArqYpuH pic.twitter.com/CavXemkVEX — Chicago Reader (@Chicago_Reader) March 16, 2016

Behind Kim Foxx’s winning campaign to become the democratic nominee were two notable strengths, a powerful back story and the financial and political resources of her former boss, Cook County Board President Toni Preckwinkle. Foxx impressed upon many voters that she was in a unique position of understand injustice after growing up in one of Chicago’s toughest housing projects. She was a victim of sexual abuse and was homeless at one time herself. In the general election, Foxx will face the Republican pick for the state’s attorney’s office, Christopher Pfannkuche.

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

Many critics of Alvarez did not directly endorse either Foxx or More, but carried the simple hashtag message #ByeAnita in highly-visible grassroots displays. The group Assata’s Daughters literally took to the sky with airplanes carrying banners associating her with another controversial politician, Chicago mayor Rahm Emanuel.

Assata’s Daughters celebrated by singing “Bye, Anita” Tuesday night and released a statement asserting their own victory. “Chicago Black youth kicked Anita Alvarez out of office,” the group said in a statement. “We did this for Rekia. We did this for Laquan. We won’t stop until we’re free and Kim Foxx should know that as well.”

I'm am over joyed with tonight results #BlmCle we did it @Pros_TimMcGinty is out of office pic.twitter.com/p1SIBcJHm3 — #Justice4Tamir (@msgoldsby74) March 16, 2016

Just after midnight on Wednesday, single-term Cuyahoga County Prosecutor Tim McGinty conceded to his opponent Mike O’Malley. O’Malley, a relative newcomer to the race who did not officially kick off his campaign until January 21, received 55.4% of the vote at last report. He does not face a challenger from an Indecent or Republican, so O’Malley has likely secured the position.

As one writer at CleveScene put it, the results of this race were a referendum on McGinty’s handling of the death of Tamir Race. McGinty was scorned for advocating against criminal charges for the two police officers who shot and killed the black 12-year-old in 2014.

“They need an individual who is willing to go out and meet with individuals and restore some type of confidence in that office and I’m that individual and I will be doing that,” O’Malley told Fox8. “I will be meeting with people I will be talking with people on the streets. It’s going to take a large effort to bring this system back, but I am willing to work with the common pleas judges, the public defenders, all the people who thought they were perhaps bullied in the past will have a partner, and that partner will be me and my team.”

As Leon Neyfakh wrote for Slate:

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.”

According to Neyfakh, the races in Cleveland and Chicago could not have been more different. While Kim Foxx slammed Anita Alvarez for her role in covering up the murder of Laquan McDonald, Mike O’Malley took a hands-off approach when it came to Tamir Rice.

In a sense, both Alvarez and McGinty ultimately were shamed by scandal. And without the efforts of the families of the slain victims of police brutality and their hard-working supporters, high-profile cases such as Laquan McDonald and Tamir Rice could have remained obscure. The results of these primaries indeed frame the efforts of Black Lives Matter and grassroots youth movements as a political success.