Accusations that a juror made racially biased statements about a defendant may require judges to break through the usual secrecy that surrounds jury deliberations, the Supreme Court ruled Monday.

“A constitutional rule that racial bias in the justice system must be addressed — including, in some instances, after the verdict has been entered — is necessary to prevent a systemic loss of confidence in jury verdicts,” Justice Anthony M. Kennedy wrote in a 5-to-3 decision.

“The Nation must continue to make strides to overcome race-based discrimination,” wrote Kennedy, who sided with the court’s four liberal members. “The progress that has already been made underlies the Court’s insistence that blatant racial prejudice is antithetical to the functioning of the jury system.”

The court’s decision came in the case of Coloradan Miguel Angel Peña Rodriguez, who found out after his 2007 conviction that a juror said he thought that Peña Rodriguez was guilty of sexual assault because he was Mexican and that “Mexican men take whatever they want.”

[Supreme Court hears case of bias in the jury room]

The premise that jury deliberations should be confidential is older than the Constitution, and Kennedy noted that in other cases, the court has declined to probe behind the jury room door.

But charges of racial and ethnic animus provide a limited exception to the rule, he wrote, necessary “to ensure that our legal system remains capable of coming ever closer to the promise of equal treatment under the law that is so central to a functioning democracy.”

Kennedy was joined by Justices Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan.

Chief Justice John G. Roberts Jr. and Justices Clarence Thomas and Samuel A. Alito Jr. dissented. They said even comments as objectionable as those in the Peña Rodriguez case did not justify such a change.

Alito wrote that “with the admirable intention of providing justice for one criminal defendant,” the court “rules that respecting the privacy of the jury room, as our legal system has done for centuries, violates the Constitution.”

Peña Rodriguez was challenging federal rules and those employed in Colorado and elsewhere that forbid challenging statements made during jury deliberations.

He was convicted of groping two teenage girls in a bathroom at a Colorado racetrack where he worked. He denied it and said it was a case of mistaken identity. The jury acquitted him of a felony charge and convicted him of misdemeanors. He was sentenced to probation and required to register as a sex offender.

After the verdict, two jurors told defense attorneys that another juror, identified in court papers as H.C., had made the comments about Mexicans and said that as a former law enforcement officer, he had seen numerous similar cases.

He said that “nine times out of 10 Mexican men were guilty of being aggressive toward women and young girls” in his experience, the jurors said, adding that H.C. called the defendant “an illegal.” (Peña Rodriguez was a legal resident, his lawyers said.)

Peña Rodriguez’s lawyers wanted the judge to investigate the comments to decide whether they had deprived their client of a fair trial. But the judge said he was barred from conducting such a review, and his decision was upheld by a 4-to-3 vote of the Colorado Supreme Court.

Colorado Solicitor General Frederick R. Yarger told the justices during oral arguments that the alleged comments from the juror were “no doubt reprehensible.” But he added that the “citizen jury system requires safeguards to ensure full and fair debate in the jury room and prevent harassment and tampering after verdicts are handed down.”

Kennedy conceded that the Supreme Court has ruled previously — when there were allegations of jurors abusing drugs or alcohol or having a pro-defendant bias — that the confidentiality of the jury process was too important to allow a judge’s investigation.

“The same cannot be said about racial bias, a familiar and recurring evil that, if left unaddressed, would risk systemic injury to the administration of justice,” Kennedy wrote. (The parties in the case and the justices agreed that the ethnic bias in the Peña Rodriguez case was the same as racial bias.)

Kennedy said there must be a “clear statement” that indicates a juror “relied on racial stereotypes or animus to convict a criminal defendant” before the judge could consider a defendant’s claim. He said it has not been shown to occur very often in states that already allow such inquiry.

But Alito said the court’s constitutional finding was a “startling development” that would only expand in the future. “At a minimum, cases involving bias based on any suspect classification — such as national origin or religion — would merit equal treatment,” Alito wrote. “So, I think, would bias based on sex . . . or the exercise of the First Amendment right to freedom of expression or association.”

Alito said that the court’s decision “seeks to remedy a flaw in the jury trial system, but as this Court said some years ago, it is questionable whether our system of trial by jury can endure this attempt to perfect it.”

The case is Peña Rodriguez v. Colorado.