Donald Trump went after the federal judge presiding over a civil case against the now-defunct Trump University Friday, calling out the judge's ethnicity in an attack spanning several minutes at a San Diego campaign rally while protests against Trump's anti-immigrant policies raged outside.

"I have a judge who is a hater of Donald Trump -- a hater. He's a hater. His name is Gonzalo Curiel. And he is not doing the right thing," Trump told supporters, kicking off a 12-minute rant in California, where he was campaigning ahead of the state's June 7 primary.

Curiel, who was first appointed by President Obama as a judge for the Southern District of California in 2011 (and later confirmed by the U.S. Senate in a voice vote), is overseeing a six-year-old lawsuit against Trump's education venture. The case -- one of many lawsuits against Trump University -- alleges that people who paid up to $35,000 for real estate were defrauded. The billionaire, according to his lawyer, is expected to testify in the class-action suit, which goes to trial in San Diego in November.

"We're in front of a very hostile judge," Trump went on. "The judge was appointed by Barack Obama, federal judge. Frankly, he should recuse himself because he's given us ruling after ruling after ruling, negative, negative, negative."

Get Breaking News Delivered to Your Inbox

"What happens is the judge, who happens to be -- we believe -- Mexican. Which is great. I think that's fine," he said. "You know what? I think the Mexicans are going to end up loving Donald Trump when I give all these jobs, OK?"

Curiel was born in East Chicago, Indiana. Curiel's parents, however, are Mexican, according to a 2002 New York Times report of the judge's work in the Southern District of California's narcotics enforcement division.

Later, Trump called for an investigation into Curiel, who the presumptive presidential nominee said should "be ashamed of himself."

"I'm telling you, this court system, judges in this court system, federal court, they ought to look into Judge Curiel," Trump said. "Because what Judge Curiel is doing is a total disgrace, OK?"

This is far from the first time Trump has attacked the federal judge.

In February, Trump posited that Curiel was biased against him because of his policy positions on immigration and his proposals to build a wall along the U.S.-Mexico border.

"I think it has to do perhaps with the fact that I'm very, very strong on the border, very, very strong at the border," Trump told Fox News in an interview. "He has been extremely hostile to me."

The network's interview followed another of Trump's tirades, at a February rally in Arkansas, where the real estate mogul had trashed Curiel for overseeing a case that he believed should have been thrown out years ago.

"There's a hostility toward me by the judge -- tremendous hostility -- beyond belief," Trump said then. "I believe he happens to be Spanish, which is fine. He's Hispanic -- which is fine."