For much of his life, Randy Halprin struggled with his Jewish identity. Throughout childhood, the now-44-year-old death row inmate strove to please his Jewish father and prove he was worthy of a bar mitzvah — the Jewish rite of passage that signifies a boy’s becoming a man.

But as he stood trial on capital murder charges before Dallas County District Judge Vickers “Vic” Cunningham in 2003, his religion became the very reason he now faces execution, a Texas judge has determined.

On Monday, Judge Lela Lawrence Mays found that Cunningham’s “unmistakable bias against Jewish people” was “too much to ignore” and ultimately deprived Halprin of his right to a fair trial. Mays recommended that Halprin be granted a new trial.

“The [witness] statements evince a specific animus against Halprin because of his Jewish identity and indicate that Judge Cunningham took satisfaction from his role in Halprin’s death sentence,” Mays wrote in a 58-page document.

The case will now go back to the Texas Court of Criminal Appeals.

Cunningham’s seemingly clean public persona as a respected judge began to unravel in 2018, when the Dallas Morning News questioned him on video about allegations that he had made racist remarks and created a living trust that would financially reward his children if they married someone of the same race and religion, and of the opposite sex.

“I strongly support traditional family values,” Cunningham told reporters questioning him in the video. “If you marry a person of the opposite sex, that’s Caucasian, that’s Christian, they will get a distribution.”

Cunningham added that he considers it a “traditional family value” to marry within one’s race.

The Morning News story influenced Halprin’s attorneys to look back into the case, said Stuart Blaugrund, a Dallas lawyer who advocated for a new trial.

“Now there’s evidence the judge may be a bigot,” Blaugrund told The Washington Post. “A lot of bigots tend to be equal opportunity bigots.”

After interviewing witnesses in 2019, Halprin’s lawyers petitioned the Texas Court of Criminal Appeals for a new trial. They claimed the death row inmate’s right to due process was violated because of Cunningham’s alleged antisemitic views. On Aug. 22, 2019, they requested a stay of execution.

In the weeks leading up to Halprin’s Oct. 10, 2019, execution date, several groups submitted amicus briefs in support of a new trial — including one signed by more than 100 Jewish attorneys in Texas.

“One hundred Jewish lawyers speaking out had a profound effect and helped channel the court’s attention on a serious problem,” Dallas attorney Marc Stanley, who co-led the initiative, told The Post.

The court agreed to the delay just six days before Halprin’s scheduled execution date. The appeals court sent the case back to the Dallas County District Court. Mays heard oral arguments this June.

The judge’s conclusion, filed on Monday, excoriated Cunningham for his “inbred bias” and “reprehensible” use of religious and ethnic slurs. The judge called the evidence “chilling” and said Cunningham’s “deep-seated animosity and prejudice toward Jewish people” affected Halprin’s case.

Mays concluded that Cunningham’s biases were consistent before, during and after the trial, making it impossible for the now-former judge to rule fairly.

The judge added that Cunningham’s “bias toward Halprin not only harmed him, but it undermined the public’s confidence that criminal justice has been — and will be — dispensed impartially.”

Cunningham denied privately making racist and antisemitic comments, according to court documents. He did not immediately respond to The Post’s request for comment late Tuesday.

Mays’s decision was viewed as a victory by Halprin’s attorneys and those who advocated for a new trial.

In a statement to the Morning News, Tivon Schardl, one of Halprin’s lawyers, said they are confident the appeals judges will grant their client a new trial.

“The facts were never in dispute,” Schardl said. “Contrary to what the state said, the Constitution protects Texans from religious bigotry in the criminal justice system.”

Since he was a child, Cunningham said he felt it was his “destiny” to be a judge, according to court documents. A Dallas native, he worked his way up the ranks and served as Dallas County prosecutor for five years until he was elected to the county criminal court in 1995. Texas Gov. Rick Perry (R) appointed him to the district court in 2001.

Cunningham’s name later became closely linked to the notorious “Texas 7” — a moniker for the seven inmates who escaped a maximum-security prison in 2000 and carried out a string of crimes that resulted in the murder of a police officer. Cunningham presided over six of the cases and sentenced each man to death. The seventh defendant died by suicide before he could be captured by police.

Halprin, who was serving a 30-year sentence for injury to a child when he escaped with the Texas 7, was arrested and charged in the officer’s murder. He maintained he did not “intend the death of that officer. I didn’t shoot him. I didn’t pull my gun,” Halprin said during the trial. But Texas’s “law of parties” allowed for an indictment and conviction because, under that law, prosecutors did not have to prove Halprin actually killed or intended to kill the victim.

Halprin pleaded not guilty and was convicted of capital murder on June 9, 2003. Cunningham sentenced him to death three days later.

Cunningham saw his role in the cases as a personal achievement, witnesses testified before Mays. The former judge boasted publicly about the Texas 7 during his campaign for Dallas County district attorney in 2005 and again in 2018 when he ran for Dallas County commissioner. He also privately told friends “he believed God had chosen him to preside over” the trials.

A childhood friend said Cunningham “took special pride” in the Texas 7 death sentences “because they included Latinos and Jews,” according to court documents.

Other comments Cunningham made behind closed doors proved vulgar and hateful, court documents show. Several witnesses attested to the former judge’s frequently using the n-word as well as derogatory epithets for Jews and Latinos.

Family members and former colleagues said he frequently used phrases like “f---ing Jew,” and referred to Jews as “dirty” and “Jew banker,” court documents show. One witness testified that Cunningham said Jews “needed to be shut down because they controlled all the money and all the power.”

Blaugrund, who co-wrote the brief from the 100 Jewish lawyers, said he was “overcome with emotion” when he read Mays’s findings that Halprin had not received a fair trial.

“The facts were so outrageous and morally repugnant that it compelled only one result, which was what judge Mays found and concluded,” Blaugrund said.

Cunningham has not presided over a court since he left his seat to run for district attorney in 2005. Four of the Texas 7 have been executed, and one died by suicide. Only Halprin and 60-year-old Patrick Murphy remain.

Blaugrund said it is possible that Halprin’s case could prompt additional appeals but added that it is probably unlikely.

“Some of the defendants who were convicted in this courtroom no longer have any avenues of relief — because they’ve been executed,” he said.