Police officers in riot gear declared a protest against Donald Trump unlawful as they made around dozen arrests outside a rally in California.
The presumptive Republican nominee was speaking to an enthusiastic crowd of supporters in San Diego's convention centre.
But outside around 1,000 people demonstrated against the billionaire tycoon, in tense scenes which included police pepper spraying some of the protesters.
Police arrested one man who climbed a railing separating protesters from officers. His arrest led demonstrators to spray water and throw empty plastic bottles at officers.
In another tense exchange, police shoved back demonstrators to separate them from Trump supporters when they left the centre after the rally.
Police declared the gathering unlawful after shouting matches erupted and people began hurling rubbish at each other.
Inside, Mr Trump made repeated attacks on Democratic frontrunner Hillary Clinton.
But he was on the defensive over negative media stories and a lawsuit against his now-defunct Trump University.
"I'm getting railroaded by a legal system," he complained.
Earlier, in Fresno, Mr Trump told California voters that he can solve their water crisis, declaring: "There is no drought."
California is in fact in the middle of a drought, and last year capped the state's driest four-year period in its history, with record low rainfall and snow.
But Mr Trump accused state officials of denying water to Central Valley farmers so they can send it out to sea "to protect a certain kind of three-inch fish".
He told thousands of supporters at the rally: "We're going to solve your water problem. You have a water problem that is so insane. It is so ridiculous where they're taking the water and shoving it out to sea."
The comments came a day after Mr Trump outlined an energy policy plan that relies heavily on expanding US fossil fuel exploration and reducing environmental regulations.
The rallies in Fresno and San Diego came as ended a campaign swing through the west, drawing vocal crowds of protesters, many carrying signs critical of his plan to wall off the US border with Mexico.
In Fresno, Mr Trump said he had spent 30 minutes before his rally meeting more than 50 farmers who complained to him about their struggles.
"They don't understand - nobody understands it," he said. "There is no drought. They turn the water out into the ocean."
California is the biggest agriculture producer in the US and the state's drought is raising the stakes in water disputes among farmers, cities and towns, and environmental interests.
A count by The Associated Press on Thursday found that Mr Trump has reached the required number of delegates to officially clinch the Republican nomination.