A speech by the divisive right-wing editor Milo Yiannopoulos at the University of California, Berkeley, was canceled on Wednesday night after demonstrators set fires and threw objects at buildings to protest his appearance.
The university announced the cancellation on Twitter around 6 p.m. local time, about an hour after a section of the campus erupted in protest.
All buildings on campus were locked down for several hours, and the university police said on Twitter that students should leave the area because of the “violent demonstration.” The lockdown was lifted around 10:55 p.m. local time.
Early Thursday morning, President Trump spoke out against the university for canceling the event.
Mr. Yiannopoulos, an editor at Breitbart News, is known for his gleeful attacks on political correctness that can sometimes veer into offensive and racially charged language.
He was barred from Twitter last year for inciting trolls to attack the “Ghostbusters” actress Leslie Jones.
His flamethrower approach has aroused a fierce backlash. His scheduled speech at U.C. Davis last month devolved into a tense standoff between protesters and the police. It was called off before it could begin over security concerns.
On Twitter, the Berkeley campus police described the episode on Wednesday night as “major protest attacks” and urged people to stay away. Crowds lingered despite police orders to disperse.
In a statement, campus administrators condemned the violence and said it “will now overshadow the efforts to engage in legitimate and lawful protest against the performer’s presence and perspectives.”
The university had gone to “extraordinary lengths” to plan for the event, it said, putting dozens of additional officers on duty and speaking to other campuses where Mr. Yiannopoulos had appeared.
On Facebook, Mr. Yiannopoulos said he had been evacuated from the campus after “violent left-wing protesters tore down barricades, lit fires, threw rocks and Roman candles at the windows and breached the ground floor of the building.”
He added, “One thing we do know for sure: The Left is absolutely terrified of free speech and will do literally anything to shut it down.”
A portable high-intensity light, the kind used on construction sites, was set afire, according to an image on Twitter.