A man has been unanimously cleared of rape - weeks after his original trial collapsed when two jurors accused the judge of bias.
Judge Diehl ordered a new trial before a different judge
Close to the end of the Swansea Crown Court trial in January, a note was handed to Judge John Diehl.
It accused him of "partiality towards the prosecution". He immediately stopped proceedings and ordered a fresh trial before a different judge.
Dean Jenkins, 33, from Port Talbot, was cleared on Wednesday after a retrial.
Mr Jenkins' original four-day trial was nearing the end when the note from two jury members was handed to Judge Diehl, the most senior judge at Swansea Crown Court.
After informing defence and prosecution barristers of the accusation, Judge Diehl said he had no choice but to stop the trial and order a fresh one in front of a different judge.
Mr Jenkins was cleared after a new trial at Swansea Crown Court
A new jury before Judge Christopher Morton took 40 minutes to find Mr Jenkins unanimously not guilty.
Mr Jenkins spent five weeks in custody between the two trials.
He had been accused of raping a 17-year-old girl, but denied the charge saying she had consented to sex.
Peter Farr, spokesman for the Judicial Communications Office, said there was no record of a similar incident in a crown court.
He added that Judge Diehl had dealt with the matter entirely properly.