An immigration judge has been forced to resign as a district judge after making a racist remark about a victim.

Richard Hollingworth was hearing a case of harassment at Preston magistrates court when he told officials to bring the victim, Deepa Patel, to court because he wanted to complete his sentencing that afternoon.

The prosecutor, Rachel Parker, said she thought it was too short notice and didn’t know whether Patel could get the time off work.

Hollingworth asked where she worked, and Parker said she did not know. The judge replied: “It won’t be a problem. She won’t be working anywhere important where she can’t get the time off. She’ll only be working in a shop or an off-licence.”

Parker asked what he meant.

Hollingworth replied: “With a name like Patel, and her ethnic background, she won’t be working anywhere important where she can’t get the time off. So that’s what we’ll do.”

At that point Parker withdrew from the case, telling the judge: “I am professionally embarrassed. I cannot prosecute this case.”

The defendant, Parvan Singh, Patel’s ex-boyfriend, was subsequently sentenced to 12 weeks in prison.

After the case the Crown Prosecution Service lodged a complaint against Hollingworth. This went to Emma Arbuthnot, the deputy senior district judge for England and Wales, on 27 November.

Hollingworth resigned the same day, and Arbuthnot asked CPS officials to relay to court staff “how appalled I am by what he said”.

An insider said: “It’s extremely rare for a district judge to resign, and for one to resign even before a formal investigation is even more rare.”

However, Hollingworth remains an immigration judge, something that leaves CPS officials “astonished”. That role may be short-lived, as the judge’s outburst is being considered by Lord Justice Gross, the senior presiding judge for England and Wales.

Last night Patel, 22, from Preston, condemned the £150,000-a-year judge’s comments: “I was born and bred in this country. I went through school, to college and then on to university to study law. It’s shocking and disgusting for anyone to say that, especially a judge. He’s the one making legal decisions and deciding people’s freedom and he’s saying stuff like that – it’s ridiculous.

“You would assume that people of this day and age, especially a judge, wouldn’t be racist. I’m more upset than angry, especially since I had already gone through so much by going to court – I was a victim of harassment, I didn’t even want to be there.

“And what’s worse, he did it behind my back. I’ve had counselling because of what happened with my ex, so to hear this went on is even more upsetting. I’m glad that I wasn’t in the room at the time, I don’t think I would have coped. It’s right that he’s resigned but it’s outrageous that he’s still an immigration judge – he needs to resign altogether.”

Patel, who is working in an office while on a gap year from university, said she was grateful to Parker “for sticking up for me”.

A spokesman for the Judicial Conduct Investigations Office (JCIO) said: “The Judicial Conduct Investigations Office can confirm that Judge Richard Terrence Peter Hollingworth has resigned as a deputy district judge (magistrates court).

“The president of the First-tier Tribunal of the Immigration and Asylum Chamber is considering the matter in accordance with the Judicial Conduct (Tribunals) Rules 2014.

“Any finding of misconduct and recommendation of disciplinary action made to the president will be subsequently handled by the JCIO in accordance with the rules.

“He remains a first-tier tribunal judge at the Immigration and Asylum Chamber, however, he is currently refraining from all judicial duties.”

Hollingworth, who is from Dronfield, Derbyshire, declined to comment.