Angela Corey, the Florida prosecutor who presided over some the Fourth Judicial Circuit Court’s most controversial cases of the past several years, lost her bid for reelection Tuesday night bringing her eight-year tenure to an end.

Melissa Nelson emerged as the Republican primary winner, earning more than 64 percent of the vote compared to Corey’s 26 percent. A third challenger, Wes White, collected less than 10 percent.

Corey’s loss was cheered by defense lawyers, academics and even former prosecutors ― many of whom had criticized her aggressive prosecution, particularly of juveniles.

“Corey’s loss is an encouraging sign that the public will no longer tolerate overzealous and unprincipled criminal prosecutions, including women and children,” Mary Anne Franks, a law professor at the University of Miami, said in a statement Tuesday.

Even musician John Legend, who cofounded the criminal justice reform campaign #FreeAmerica weighed in on the Fourth Judicial Circuit State’s Attorney’s race. In a statement, Legend said:

Prosecutors possess much of the power to end mass incarceration and to make our criminal justice system smarter and more just. They have the power to decide whether to charge or not, how to negotiate ​a plea deal, and whether or not to pursue the harshest punishment possible. ...Today the voters in Jacksonville and throughout Florida’s 4th Judicial Circuit have decided that Angela Corey failed in that responsibility by aggressively seeking the death penalty and egregiously charging juveniles, particularly those of color, as adults. Her tactics have been rejected by her community, and we applaud the voters for rejecting them. This is a sign of positive things to come in our fight for a #FREEAMERICA.

Corey’s eight-year tenure was full of controversial cases and a prosecution style critics described as overzealous.

Her jurisdiction included Clay, Duval and Nassau Counties and under her watch, Duval emerged as one of 16 outlier counties producing a disproportionate number of death sentences.

Corey personally boasted one of the highest rates of death sentences in the U.S. and has sentenced more people to death than any other prosecutor in Florida. Since 2008, she’s cinched 24 death penalty convictions, 19 in Duval County cases. A former public defender noted Corey prosecuted cases other states attorneys “wouldn’t touch.”

“Corey's loss is an encouraging sign that the public will no longer tolerate overzealous and unprincipled criminal prosecutions." Mary Anne Franks, University of Miami law professor

Tuesday’s primary wasn’t the first time Nelson, a 44-year-old corporate lawyer and former prosecutor, had faced off against Corey.

Nelson was part of the team that in 2013 defended 12-year-old Cristian Fernandez pro bono after Corey prosecuted him as an adult and charged him with the first-degree murder of his 2-year-old half-brother. Fernandez was accused of shoving the younger boy into a bookshelf, which caused head injuries that he died from days later.

Corey drew criticism for her decision to prosecute a juvenile so harshly ― Fernandez was the youngest person ever to be charged as an adult with first-degree murder in Jacksonville history. He eventually took a plea deal and will be released in 2018, when he’s 19 years old.

At the time of the verdict, University of Miami law professor Tamara Lave, who followed the case, told the Florida Times-Union Fernandez should never have been charged with first-degree murder at his young age in the first place.

“The way the prosecution and police handled this was unpardonable,” she said.

Daron Dean/Reuters Prosecutor Angela Corey answers questions about the Trayvon Martin case during a news conference at The State Attorney's Office in Jacksonville, Florida, April 11, 2012.

Corey faced similar rebuke for her decision to seek a 20-year sentence against Marissa Alexander, a mother who fired a warning shot at her abusive husband who had threatened to kill her.

Alexander rejected Corey’s plea deal and was ultimately tried and sentenced to 20 years after a jury convicted her in 12 minutes.

After her conviction was overturned, Corey re-filed the same charges with a 60-year sentence. Corey was accused of being motivated by politics and racial bias in the case. Alexander was ultimately set free under the terms of a new plea deal that capped her sentence.

But perhaps none of Corey’s cases drew as much attention as her prosecution of George Zimmerman, the Florida neighborhood watch volunteer accused of shooting 17-year-old Trayvon Martin, an unarmed black teen.

Corey was appointed the special prosecutor in the Zimmerman case, but failed to get a conviction despite strong evidence Zimmerman was responsible for Martin’s death. She was accused of overcharging Zimmerman with second-degree murder rather than manslaughter, thus setting her office up to lose the case by posting a standard they surely couldn’t meet.

Pool via Getty Images George Zimmerman glances at State Attorney Angela Corey during the start of the lunch recess during George Zimmerman trial in Seminole circuit court, July 3, 2013, in Sanford, Florida.

Corey’s ouster follows a growing trend of harsh “tough on crime” prosecutors losing their seats to more reform-minded candidates.

Earlier this year, Cook County State’s Attorney Anita Alvarez ― who presided over a number of high-profile cases that involved Chicago police shooting civilians like Rekia Boyd and Laquan McDonald ― was roundly dismissed.

In Cleveland’s Cuyahoga County, Prosecutor Tim McGinty, who failed to bring charges against the police officer who killed 12-year-old Tamir Rice, summarily lost his seat.

Hard-nosed district attorneys in Louisiana, Mississippi and Texas faced similar fates after tenures ― sometimes decades long ― of harsh prosecutions.

The Nation’s cover story at the time of Corey’s Tuesday defeat featured her on the cover with the accompanying article that asked “Is Angela Corey The Cruelest Prosecutor In America?”

“Corey’s defeat tonight continues a small—but important—trend of powerful, incumbent prosecutors losing primary elections for being too aggressive,” Fordham University law professor John Pfaff said in a statement Tuesday.

“Tonight is further evidence,” he continued, “that being the toughest prosecutor on the block no longer ensures victory, even in a Republican primary.”

Clarification: This article has been updated for consistency to reflect that Corey was a Republican candidate. Due to an editing error, she was at one point identified as a Democrat.