(Reuters) - Hundreds of protesters at the University of California at Berkeley on Wednesday smashed windows, set fires and clashed with police as they forced a right-wing speaker to cancel his appearance at the liberal-leaning institution.

Two hours before far-right Breitbart News editor Milo Yiannopoulos was to give a speech at the student union, protesters tossed metal barricades and rocks through the building’s windows and set a light generator on fire near the entrance, footage from news outlets showed.

Police ordered protesters to disperse as the school put the campus on lockdown. Protesters also tossed bricks and fireworks at police in riot gear who fired rubber pellets back at the crowd, according to SFGate.com, a news outlet in San Francisco.

“We shut down the event. It was great. Mission accomplished,” a protester told CNN.

Some 150 “masked agitators” were responsible for the violence during the otherwise largely peaceful protest of about 1,500 people, the university said in a statement, noting that the school “is proud of its history and legacy as home of the Free Speech Movement” in the 1960s.

President Donald Trump’s chief strategist, Steve Bannon, previously headed Breitbart News and CNN reported that many of the protesters voiced opposition to the Republican president.

Many of Trump’s executive orders and proposed policies, including his suspension of the U.S. refugee program and temporary ban on travelers from seven Muslim-majority countries, have been met by largely peaceful protests that have drawn tens of thousands of people across the United States.

Slideshow ( 6 images )

One protester at Berkeley held a sign that said “No Safe Space for Racists” while other protesters danced to hip hop music, footage from a Facebook Live feed showed.

Protesters later marched along streets near the campus where some smashed storefront windows and car windshields while clashing with police, the feed showed.

Yiannopoulos, whose account on Twitter was suspended last year after he was accused of participating in the online harassment of an African-American actress, criticized “the Left”, saying in a statement it was “absolutely terrified of free speech and will do literally anything to shut it down.”

He also said on Fox News that he was evacuated by police after protesters began throwing rocks and other objects at the building.

“Obviously it’s a liberal campus so they hate any libertarians or conservatives who dare to express an opinion on their campuses,” he said. “They particularly don’t like me.”