SAN DIEGO – As hundreds of protesters outside his rally here Friday afternoon chanted obscenities, waved Mexican flags and clashed with police, Donald Trump reveled on stage in the drama his candidacy has created.

The Republican Party’s presumptive presidential nominee gave a fiery speech in San Diego and sought to leverage the power of his pulpit to shame one of this city’s federal judges, Gonzalo Curiel, who is hearing a class-action lawsuit against Trump University.

Trump delivered a lengthy monologue about the years-old case involving students who claim they were defrauded by Trump’s real estate “university.” He delved so deeply into details of the case -- at one point, he talked about the origin of the name of the law firm representing him -- that he seemed to lose the attention of his crowd.

Trump leveled a series of blows against Curiel. He called him “a hater of Donald Trump” and “very hostile” person who had “railroaded” him. He then taunted the judge, who has scheduled a trial for late November, after the election.

“I’ll be seeing you in November, either as president…” Trump said, trailing off. “I think Judge Curiel should be ashamed of himself. I think it’s a disgrace that he’s doing this.” Trump brought up Curiel’s ethnicity: “The judge, who happens to be, we believe, Mexican…I think the Mexicans are going to end up loving Donald Trump.”

Campaigning here just a few miles from the Mexican border, Trump repeatedly said he would win the support of Latinos in the general election, even though polls show Latino voters overwhelmingly opposed to his candidacy.

Pointing to a supporter’s sign, Trump said, “I really like when they put up ‘Latinos for Trump.’ ‘Latinos for Trump.’ I love it. We’re going to do great with Latinos.”

But the scene outside his rally offered a different take. Hundreds of protesters packed into a barricaded courtyard between the San Diego Convention Center, where Trump was campaigning, and downtown’s Gaslamp Quarter district. People held homemade signs, large Mexican flags and half a dozen Trump piñatas -- including one that had dollar signs for eyes and another with a pig's nose.

One poster referenced Trump's wife, who immigrated to the United States from Slovenia: "The Art of the Deal. Deport Melania. Legalize 11 million." Another: "Trump, Shame of America." Another: "Jesus would not vote for Trump." And: "Racist, go home."

As the rally progressed inside, a few protesters -- including two women not wearing shirts -- were escorted out of the convention center by police officers and cheered by the protesters. As a yellow helicopter circled above, a speaker blared a expletive-filled song about Trump. The crowd's most popular chant was: "F--- Donald Trump! F---Donald Trump!"

Dozens of local police officers and sheriff's deputies carrying riot gear stood guard outside the convention center. As the crowd became more and more agitated, one officer said to his colleagues: "Hats on, guys, hats on." With helmets on, the police formed long lines across from the barricaded protesters. At one point, a handful of protesters tried to rush out of their protest area and were beaten back by half a dozen police officers with batons. At least one protester then spit at a police officer and others threw water and small objects.

The crowd then started chanting: "F--- the police!" One woman tried to change the vibe by chanting: "Keep the peace!"

The protesters kept chanting and yelling, well after Trump had departed for the airport. Someone threw the head of a Trump piñata over the barricades at the police. As the rally ended, supporters of Trump were released from doors far from the protesters and dozens of officers in riot gear filled a large barrier between the two groups.