A federal judge in Kansas has resigned his post on Monday after he was reprimanded last year for sexual harassment of female workers and for having an extramarital affair with a felon on probation.

U.S. District Court Judge Carlos Murguia said in his resignation letter Tuesday to President Trump that he would step down April 1 and he apologized for his actions.

KANSAS JUDGE REPRIMANDED FOR SEXUAL HARRASSMENT, AFFAIR WITH FELON

"In recent months, it has become clear that I can no longer effectively serve the Court in this capacity," Murguia wrote. "I therefore tender my resignation with a heavy heart and profound apologies, out of respect for the federal judiciary, my colleagues, my community and -- most importantly -- my family."

Although an internal investigation concluded in September found that Murguia engaged in inappropriate behavior and he was publicly reprimanded for it, the Judicial Council for the 10th Circuit U.S. Court of Appeals said at the time that "the Special Committee found no evidence that his misconduct continued after he was served with the complaint. He has also offered to take voluntary corrective action."

The court ruled that the disgraced judge’s “yearslong extramarital sexual relationship with a drug-using individual,” who'd been on probation and is now back behind bars, “placed himself in such a compromised position that he made himself susceptible to extortion.”

Murguia, who was named to the federal court in 1999 by former President Bill Clinton, decided just five months later to hand in his resignation.

He wrote that has been "honored to serve in this position," adding that "my tenure on the Court has been the highlight of my professional life."

CLICK HERE FOR THE FOX NEWS APP

The Kansas native is the son of Mexican immigrants. One of his sisters, Mary Murguia, is a federal appeals judge based in Arizona, becoming the first brother and sister to serve on the federal bench. Another sister is a notable civil rights leader Janet Murguia.