An immigration and asylum tribunal judge is being investigated over a remark he is alleged to have made about an Asian witness in a harassment case.
During a hearing in Preston, Peter Hollingworth was reported to have said to a prosecutor: "With a name like Patel, she can only be working in a corner shop or off licence."
Mr Hollingworth has since resigned from his role as a deputy district judge.
He is also currently "refraining" from tribunal duties, the judiciary said.
The comment is alleged to have been made at a procedural hearing on 30 October at Preston Magistrates' Court.
A Crown Prosecution Service spokeswoman said HM Courts and Tribunals Service was contacted as the prosecutor considered the judge's words "to be inappropriate".
The prosecutor had been arranging a date for Miss Patel to attend court at the time the alleged comment was made by Mr Hollingworth, whose full name is Richard Terrence Peter Hollingworth but is known as Peter.
The Judicial Conduct Investigations Office's immigration and asylum tribunal section is now investigating the judge's conduct.
The investigation will look at a number of lines of inquiry including whether the judge's words amounted to racism, a spokesman for the team said.
He said: "The Judicial Conduct Investigations Office can confirm that Judge Terence Richard Peter Hollingworth has resigned as a deputy district judge.
"Any finding of misconduct and recommendation of disciplinary action... will be subsequently handled by the Judicial Conduct Investigations Office in accordance with the rules.
"He currently remains a first-tier tribunal judge at the Immigration and Asylum Chamber; however, he is currently refraining from all judicial duties."
Another judge, Peter James Michael Hollingworth, who also hears immigration cases and is a district judge in the same region is entirely unconnected with the comment under investigation and continues to preside in court.