A senior circuit judge has resigned after claims about his private life.
Judge Gerald Price QC was suspended last year following allegations in a newspaper about the judge and a male prostitute.
The Office for Judicial Complaints said Judge Price had now resigned following an investigation into allegations about his conduct.
The Lord Chancellor and Lord Chief Justice had already informed him his behaviour merited removal from office.
Judge Price's resignation took effect from 30 June, before the disciplinary process was formally concluded.
A spokesperson for the Office for Judicial Complaints said: "Gerald Price QC, a circuit judge who was appointed to the Wales Circuit in 2000, has resigned from judicial office following an investigation into allegations about his conduct originally published in the media in June 2009.
"Whilst the media reported a number of allegations against Judge Price, the judicial investigation only focused on those that had an impact on his role as a judge.
"The investigation found that his actions brought the judiciary into disrepute, rendering his position untenable.
"In the light of the investigation, the Lord Chancellor and Lord Chief Justice informed the judge in December 2009 that they considered his behaviour merited removal from office."
The spokesperson said Judge Price had asked for the decision to be reviewed, but the review body panel agreed with the original decision and recommended he be removed from office.
Judge Price, who is married, usually heard cases in Swansea but also sat in Cardiff and Carmarthen.