A protest outside a campaign rally for Donald J. Trump in Costa Mesa, Calif., turned violent late Thursday night, as the crowd smashed a police car, the authorities closed nearby streets and officers arrested about 20 people.
The unrest erupted outside an amphitheater where Mr. Trump, the favorite in the race for the Republican presidential nomination, was addressing several thousand supporters, according to the Orange County Sheriff’s Department.
There were no major injuries, and the Sheriff’s Department reported on Twitter that the protest was over and that the crowds had dispersed around 11 p.m., after officers on horseback pushed people away from the amphitheater at the OC Fair & Event Center.
Video from Los Angeles-area television stations and photographs from The Los Angeles Times captured the mayhem, including efforts by some of the mostly young protesters to turn over a patrol car.
At least one confrontation with a Trump supporter turned bloody, and other protesters threw rocks and beer bottles while chanting anti-Trump slogans.
Many of the protesters said they had come to express their opposition to Mr. Trump’s proposal to build a wall along the United States-Mexico border and his comments about immigrants from Mexico in general.
“I knew this was going to happen,” Daniel Lujan, 19, told The Los Angeles Times. “It was going to be a riot. He deserves what he gets.”
Hundreds of protesters began gathering outside the Trump rally hours before it began, sometimes facing off with supporters who could not get inside after all the tickets were given away. Law enforcement officials stationed themselves between the two groups.
“I’m against Trump’s nativist and nationalistic agenda, which divides people and is very hateful of the other,” Rojelio Banuelos, 26, told CNN.
Some people in the crowd temporarily blocked a highway entrance and used benches from a hotel to block traffic, The Los Angeles Times reported.
Concerns about violence have shadowed Trump rallies across the country, most notably in Chicago in March, when the candidate canceled an appearance as supporters and opponents clashed inside the auditorium before he was scheduled to speak.
In other cities, Mr. Trump’s security has tried to identify and exclude potential demonstrators before they enter his events. But in one event near Dayton, Ohio, Secret Service agents briefly encircled the candidate after a man leapt over a security barrier and rushed toward the stage. In Kansas City, Mo., the police used pepper spray during standoffs with crowds.
On Thursday night in Costa Mesa, Mr. Trump did not back down from his promise to build a border wall, and he maintained his strident tone about immigration from Mexico. His guests included members of a group leading a campaign that purports “to remember victims killed by illegal aliens.”
The candidate spent the day before the rally at the Trump National Golf Club Los Angeles.
“I would have stayed there,” The Los Angeles Times quoted him as telling supporters, “but I had to come talk to you people.”