Much of the Supreme Court’s 7–2 decision in Flowers v. Mississippi on Friday reads like a nightmare. The facts are straight out of the Jim Crow South: A white Mississippi prosecutor, Doug Evans, prosecuted a black man, Curtis Flowers, for the exact same crime six times in search of a capital conviction that might stick. In the process, Evans struck 41 of 42 black prospective jurors, an obvious attempt to secure an all-white jury. Several convictions were overturned due to flagrant prosecutorial misconduct. At Flowers’ sixth trial, however, Evans finally got a death sentence upheld by the Mississippi Supreme Court. Can that punishment possibly comport with the Constitution’s command of equal protection?

In a decision written by Justice Brett Kavanaugh, the U.S. Supreme Court said no, reversing Flowers’ conviction in light of obvious racial bias. To Kavanaugh’s credit, his opinion confronts Evans’ racism head-on and bolsters constitutional safeguards against prosecutorial attempts to purge minorities from juries. Meanwhile, Justice Clarence Thomas penned a scorching dissent, joined in part by Justice Neil Gorsuch, savaging the majority for trying to “boost its self-esteem” while “needlessly prolong[ing] the suffering of four victims’ families.” Thomas, in fact, is eager to overturn decades of precedent limiting prosecutors’ ability to exclude minority jurors on the basis of their race.

The facts of Flowers are simply appalling. In 1996, someone murdered four people at Tardy Furniture in Winona, Mississippi; Evans, the district attorney, decided Flowers was the killer. The evidence against Flowers was astonishingly meager: It rested largely on eyewitness testimonies, provided weeks and months after the crime, that often provided conflicting details. No eyewitnesses came forward until the state offered a $30,000 reward, and several later reported being coerced by prosecutors into implicating Flowers. Investigators never found DNA evidence or fingerprints tying Flowers to the murder. Instead, they identified a single particle of gunshot residue on Flowers’ hand—which, they acknowledged, could have come from the police car that took him to the station, or from the fireworks he set off the day before.

Throughout the six trials, three “jailhouse snitches” testified that Flowers confessed to them; each later recanted, admitting that they had lied. One conceded that he fabricated the confession to receive a sentence reduction. The victims were executed with chilling efficiency, several execution-style, yet Flowers had no criminal history; he did not even own a gun. His cousin, Doyle Simpson, owned the gun allegedly used in the killings. Multiple eyewitnesses saw a man who looked like Simpson outside Tardy Furniture on the morning of the crime. Their evidence was not contradictory or coerced.

Nonetheless, Evans relentlessly targeted Flowers, engaging in a quest to remove black Mississippians from the jury each time. He did so using peremptory strikes, which allow trial attorneys to strike prospective jurors without providing a reason. In 1986’s Batson v. Kentucky, the Supreme Court attempted to come up with a tool to combat racist peremptory strikes: If a defendant challenged a strike on racial grounds, prosecutors had to provide a “neutral explanation” for their decision. The court explained that the Constitution “forbids the States to strike black [jurors] on the assumption that they will be biased in a particular case simply because the defendant is black.” Otherwise, the “core guarantee of equal protection … would be meaningless.”

Nonetheless, at Flowers’ first trial, Evans used peremptory strikes to remove every potential black juror, obtaining an all-white jury that sentenced Flowers to death. The Mississippi Supreme Court reversed because the prosecution acted “in bad faith” by baselessly disputing the credibility of a defense witness and mentioning facts not in evidence. Next time around, Evans once again used his peremptory strikes to remove all black jurors, but this time the trial judge objected and seated one black juror. The jury convicted Flowers, but its verdict was reversed again for essentially the same reasons.

Third time up: Prosecutors used all their peremptory strikes to remove black prospective jurors. Only one black juror was seated. The jury sentenced Flowers to death, but the Mississippi Supreme Court reversed, finding a Batson violation. At the fourth and fifth trials, prosecutors ran out of peremptory challenges and had to settle for juries with multiple blacks. Both times, the jury failed to reach a verdict, resulting in mistrials. Finally, at Flowers’ sixth trial, prosecutors used five out of six peremptory strikes on black potential jurors. A jury of 11 whites and one black sentenced Flowers to death. He argued another Batson violation, but the Mississippi Supreme Court upheld his sentence, so he appealed to SCOTUS.

Technically, only the peremptory strikes at Flowers’ sixth trial are at issue in this case. But Kavanaugh recounted the history of Evans’ racist machinations and clarified that this “historical evidence” matters. Across Flowers’ many trials, he wrote:

[T]he State employed its peremptory strikes to remove as many black prospective jurors as possible. The State appeared to proceed as if Batson had never been decided. The State’s relentless, determined effort to rid the jury of black individuals strongly suggests that the State wanted to try Flowers before a jury with as few black jurors as possible, and ideally before an all-white jury.

“We cannot ignore that history,” the justice concluded, when assessing Evans’ removal of blacks from the jury at Flowers’ most recent trial. “We cannot take that history out of the case.”

Kavanaugh also pointed to “dramatically disparate questioning of black and white prospective jurors in the jury selection process for Flowers’ sixth trial.” Prosecutors “asked the five black prospective jurors who were struck a total of 145 questions.” Yet they asked “the 11 seated white jurors a total of 12 questions.” Put differently, each prospective black juror was grilled with an average of 29 questions; each seated white juror was asked an average of one.

Why? By “asking a lot of questions of the black prospective jurors,” Kavanaugh wrote, “a prosecutor can try to find some pretextual reason—any reason—that the prosecutor can later articulate to justify what is in reality a racially motivated strike.” But a court “confronting that kind of pattern cannot ignore it.” This “lopsidedness” can demonstrate that the prosecutor was attempting to “disguise a discriminatory intent.”

Assessing all this damning evidence, Kavanaugh found that prosecutors struck at least one potential black juror from Flowers’ sixth trial on the basis of race. He tossed out the death sentence and sent the case back down to Mississippi for a new trial. Evans still serves as district attorney and could handle Flowers’ seventh trial—even though SCOTUS has now made clear that his conduct in this case has been permanently tainted by racism.

In dissent, Thomas accused the majority of taking Flowers’ case because it wanted to “scorn” Mississippi state courts, or perhaps “because the case has received a fair amount of media attention.” (The media, he warned, often prefers “to titillate rather than to educate and inform.”) Thomas dismissed Kavanaugh’s opinion as “manifestly incorrect,” insisting that Evans had perfectly good reasons to strike five black prospective jurors from the sixth trial. And he wrote that the majority “builds its decision around the narrative that this case has a long history of race discrimination. This narrative might make for an entertaining melodrama, but it has no basis in the record.” (It does; Thomas just rewrites the record to excuse every single instance of Evans’ egregious racial bias.)

It’s an encouraging sign that Kavanaugh just ignored Thomas’ dissent.

Gorsuch joined those portions of the dissent, but declined to sign onto its most radical assertion: that Batson itself should be overruled. Black defendants tried by all-white jurors created by racist prosecutors, Thomas wrote, suffer “no legally cognizable injury.” The accused suffer no equal protection violation when they are tried by a jury selected on the basis of race. Moreover, prosecutors should be permitted to make “generalizations” about black jurors, because “race matters in the courtroom.” Thomas ended his screed by berating the court for “needlessly prolong[ing] the suffering of four victims’ families” in an effort to “boost its self-esteem,” and declared: “If the Court’s opinion today has a redeeming quality, it is this: The State is perfectly free to convict Curtis Flowers again.”

It’s an encouraging sign that Kavanaugh just ignored Thomas’ dissent, as it is really too wacky, too hostile, and aggrieved to merit a response. Rather, with a majority of the court behind him, Kavanaugh made the case that courts can identify discriminatory intent without a smoking gun of overt racism. Evans never used racial epithets in the courtroom or stated his desire for a white jury; his actions alone told the court everything it needed to know about his motivations. This Supreme Court may not always confront unconstitutional prejudice with such clear-eyed pragmatism, but it’s worth celebrating a decision that enforces constitutional limits on racist prosecutions.