An Oklahoma man’s murder conviction has been overturned after it was discovered that the county judge who presided over the trial was having a sexual relationship with one of the prosecutors.

Robert Hashagen III was convicted in February of murdering 94-year-old Evelyn Goodall in 2013.

SARAH JESSICA PARKER, CYNTHIA NIXON AND KRISTIN DAVIS SPEAK OUT ON CHRIS NOTH ALLEGATIONS: ‘DEEPLY SADDENED’

But now that conviction has been tossed after former Oklahoma County District Judge Tim Henderson admitted to having a sexual relationship with a district attorney in his office who helped prosecute the case, FOX25 Oklahoma City reported.

Robert Hashagen III was convicted in February of murdering 94-year-old Evelyn Goodall in 2013.

Robert Hashagen III was convicted in February of murdering 94-year-old Evelyn Goodall in 2013. (Oklahoma County Jail)

Henderson, who is married, resigned in March after three female attorneys came forward with allegations of sexual misconduct against him, the Oklahoman previously reported.

One of the three attorneys was a prosecutor in the Hashagen case. She said the judge began sexually abusing her in April 2016 and continued until July or August 2018, according to the paper.

Henderson described the sexual involvement as consensual and said he maintained his role "as a neutral and detached judicial officer" at all times during the Hashagen case.

"My rulings were fair and supported by the evidence and facts presented by the attorneys," he said.

CLICK HERE TO GET THE FOX NEWS APP

However, the scandal may impact even more cases.

A different judge threw out Hashagen’s conviction and sentence on Monday, FOX25 reported. Hashagen is expected to be retried.

The Associated Press contributed to this report.