(CNN) A federal district court judge in Kansas who was publicly admonished last fall for sexual misconduct and having an extramarital affair resigned on Tuesday.

In a letter to President Donald Trump, US District Judge Carlos Murguia of the District of Kansas offered his resignation and expressed "profound apologies."

"In recent months, it has become clear that I can no longer effectively serve the Court in this capacity," he said.

Murguia's resignation comes following congressional committee hearings last week on efforts by the judiciary to protect judicial employees from sexual harassment, and after a panel of judges in September publicly admonished him for behavior they said could have put him at risk of "extortion."

Murguia, who had served as a district judge since 1999, stepped down with "a heavy heart and profound apologies, out of respect for the federal judiciary, my colleagues, my community and — most importantly — my family," he said in the letter.

Read More