WASHINGTON — The U.S. Supreme Court Thursday reversed the conviction of a Mississippi death row inmate who said the state prosecutor repeatedly kicked black people off the jury each time he was tried for the same murders.

"Equal justice under law requires a criminal trial free of racial discrimination in the jury selection process," wrote Justice Brett Kavanaugh in the court's 7-2 ruling.

The decision was a victory for Curtis Flowers, who is black. He was tried six times for the 1996 murder of four furniture store employees in Winona, Mississippi where he had recently worked. Of the first five trials, one conviction was thrown out over questions about evidence and two resulted in mistrials.

But in the other two trials, state courts found that the prosecutor in the case, Doug Evans, wrongly excluded potential jurors on the basis of their race. In the case before the U.S. Supreme Court involving his sixth and most recent trial, Flowers again accused the prosecutor of impermissibly removing blacks from the jury.

Kavanaugh said that in the six trials combined, the prosecutor moved to strike 41 of the 42 black prospective jurors and "engaged in dramatically disparate questioning of black and white prospective jurors."

Curtis Flowers Mississippi Department of Corrections via AP File / AP

When a jury is being selected, lawyers for each side are allowed to exclude a certain number for potential bias or other cause. But they are also allowed to make peremptory strikes, which require no explanation.

Three decades ago, the Supreme Court said prosecutors cannot use those strikes to remove jurors solely because of their race. In rulings since then, the court has explained how judges are to evaluate whether race was an improper factor in jury selection.

Download the NBC News app for breaking news and politics

Thursday's ruling, Kavanaugh said, breaks no new legal ground. "We simply enforce and reinforce" those earlier rulings, he wrote. "All of the relevant facts and circumstances taken together establish that the trial court committed clear error" in concluding that the prosecutor's actions were not motivated by discriminatory intent.

When the case was argued in March, Justice Clarence Thomas broke his three-year courtroom silence by asking a few questions. He wanted to know if the defense lawyers used any peremptory challenges to exclude potential jurors. Told that they did, Thomas asked, "And what was the race of the jurors struck there?" The answer: only whites.

Thomas dissented from Thursday's ruling, saying that it distorts the trial court record. He also said the court's other rulings about striking jurors on the basis of race were a misguided attempt to remedy a general societal wrong by regulating how lawyers can strike jurors, a view he has expressed before.

Justice Neil Gorsuch joined in most of the dissent, except for the part that criticized the court’s line of cases about dealing with racial prejudice in jury selection.

Thursday's ruling leaves the state free to put Flowers on trial again.