At least three people with weapons were arrested around the campus of The University of California, Berkeley, on Thursday night ahead of a much-anticipated speech from conservative commentator Ben Shapiro.

“Our mission is to safeguard our community while facilitating the peaceful expression of free speech,” the police tweeted. “For those who commit crimes, we will be making arrests. We will work with the community to identify, investigate and prosecute suspects.”

City and campus officials anticipated protests against Shapiro, a former Breitbart editor, and prepared for possible violence with a variety of new strategies and tightened security. It was not immediately clear whether the people arrested Thursday were protesters.

The Berkeley College Republicans invited right-wing provocateur Milo Yiannopoulos to speak last February, but the event was abruptly canceled when masked left-wing anarchists rioted outside the event to shut it down.

Police with riot gear have surrounded the plaza in front of Zellerbach Hall, where Shapiro was set to speak.

For the first time in two decades, officers were armed with pepper spray after the city council modified a 1997 ban at an emergency meeting this week.

"We have seen extremists on the left and right in our city," said Berkeley Mayor Jesse Arreguin, a Democrat who backed the police request to use pepper spray. "We need to make sure violence is not allowed."

UC Berkeley spokesman Dan Mogulof says the security could cost $600,000.

Later this month, Yiannopoulos says he plans to hold a "Free Speech Week" on campus that features Ann Coulter and Steve Bannon, ex-chief strategist for President Donald Trump who has returned to Breitbart News.

The Associated Press contributed to this report.