San Diego is considered a bi-national city by many and about a third of the city's population is Latino. During Trump's speech protesters outside scaled a barrier and lobbed water bottles at police. One man was pulled off the wall and arrested as others backed away.
Afterwards, Trump supporters and anti-Trump demonstrators mixed in the streets, many shouting epithets and some throwing water bottles.
Police in riot gear declared the gathering an unlawful assembly and ordered the crowd to disperse, herding them from the hotel and restaurant-filled Gaslamp Quarter.
San Diego police said on Twitter that 35 arrests were made during the protest. No property damage or injuries were reported, police said.
"Fantastic job on handling the thugs who tried to disrupt our very peaceful and well-attended rally," Trump tweeted to police afterwards.
Trump has weathered months of blowback from all ends of the political spectrum for his immigration policy, which calls for the building of a wall along the US-Mexico border and deporting the nearly 11 million undocumented immigrants who live in the United States.
Critics have said his plan is needlessly cruel and impossible to implement.
At Trump's campaign stops, attendees often chant "build the wall".
Although Trump is running unopposed in the June 7 California Republican primary, his stance on border control and deportation seems unlikely to resonate with the electorate in a state where political fallout from a Republican-backed crackdown on illegal immigrants 20 years ago cost the party dearly.
Yesterday was not the first time Trump has been greeted by civil unrest in California, home to the largest Latino population in the country. Late last month, a visit to the California Republican convention set off days of protests in the area, leading to several arrests.
Shortly before taking the stage in San Diego, Trump issued a statement ruling out a one-on-one debate with second-place Democratic hopeful Bernie Sanders, who was also in California, killing off a potentially high-ratings television spectacle.