A handful of people chanted "shame, shame, shame" at those heading into the speech by former Breitbart editor Ben Shapiro. Others held signs protesting the university's decision to host him.
Only two arrests were reported before the speech began. People were taken into custody for battery on a police officer and carrying a banned weapon.
Hundreds of others gathered just to watch the scene unfold on the campus that was on virtual lockdown much of the day.
VIDEO: Who is Ben Shapiro?
Streets were closed and concrete barriers were erected in what many saw as the latest polarizing event to raise concerns about violence in the city.
Authorities sealed off Sproul Plaza - the central hub of the campus - and created a perimeter around several buildings, including the site where Shapiro was set to speak to about 1,000 people who received free tickets.
Shapiro was invited to speak by campus Republicans, who say the liberal university stifles the voice of conservative speakers.
VIDEO: What to do if you're stopped by police at a rally
Spencer Brown, a spokesman for Young America's Foundation, the group organizing Shapiro's lecture series, "Campus Thuggery," said there should be few problems if police backed up their show of force.
Nick Handley, 18, a high school senior from Modesto, about 85 miles (135 kilometers) east of Berkeley, was among those lined up to see Shapiro. He said he tried to get other people to come with him, but they were afraid about potential violence.
"It really is sad," he said, referring to the heavy police presence. "This is taxpayer money. It's terrible they have to have this because a speaker wants to share his views."
UC Berkeley spokesman Dan Mogulof estimated security costs could hit $600,000 for the event. He said the school was committed to ensuring the safety of students and people attending the event, and to making it successful.
The city and campus have become a flashpoint this year for the country's political divisions, drawing extremist groups from the left and right.
RELATED: 95-year-old Holocaust survivor vows to march against hate in Berkeley
"We can't turn a blind eye to reality and to what we've learned from recent events on this campus and in this city and around the country," Mogulof said.
Police and UC Berkeley officials were criticized last February for giving demonstrators wide latitude and standing aside as anarchists hurled Molotov cocktails at officers and caused $100,000 worth of damage during a planned speech by right-wing provocateur Milo Yiannopoulos. The event was canceled.
A list of banned items Thursday included shields, masks, bandanas, poles, and torches, and for the first time in two decades, the city council authorized city officers to use pepper spray to control violence.
Four political demonstrations have turned violent in Berkeley since February, prompting officers to come up with new strategies to control rowdy and sometimes dangerous crowds.
Thursday's event was being seen as a test run for later in the month when Yiannopoulos plans to return to campus for what he is calling a "Free Speech Week" on campus featuring conservative commentator Ann Coulter and Steve Bannon, ex-chief strategist for President Donald Trump who has returned to Breitbart News.
Campus officials say that event is not yet confirmed.
Click here for a look back at stories and videos about recent protests around the Bay Area.