President Trump tweeted this threat to UC Berkeley after the campus erupted in violence over a controversial speaker

Protestors watch a bonefire on Sproul Plaza during a rally against the scheduled speaking appearance by Breitbart News editor Milo Yiannopoulos on the University of California at Berkeley campus on Wednesday, Feb. 1, 2017, in Berkeley, Calif. The event was canceled out of safety concerns after protesters hurled smoke bombs, broke windows and started a bonfire. (AP Photo/Ben Margot)

After a night of violent protests on the campus of the University of California, Berkeley against the planned speech from Milo Yiannopoulos, President Donald Trump came down hard on the university.

Videos by Rare

Via Twitter early Thursday, Trump threatened to withhold federal funding if “U.C. Berkeley does not allow free speech and practices violence on innocent people with a different point of view.”

https://twitter.com/realDonaldTrump/status/827112633224544256?ref_src=twsrc%5Etfw

The riots sparked Wednesday and forced university officials to cancel the speech by Yiannopoulos, who was set to appear as part of a book tour. A self-proclaimed internet troll, he is also an editor at Breitbart News, the hard-right website previously under the leadership of Stephen Bannon, Trump’s chief strategist, who has played a key role in many of the executive orders issued over Trump’s first two weeks in office.

RELATED: A preacher at a Portland airport protest was knocked out by a “metallic” object

Berkeley is the flagship campus of the public University of California system. It received $370 million in federal research funding for the 2015-2016 school year, according to the university’s website. It has been renowned as the home of the Free Speech Movement since the turbulent 1960s.

School officials canceled the event after demonstrators threw smoke bombs and flares at buildings. The protests grew violent, with some using baseball bats to smash ATMs. At a nearby Walgreens, demonstrators spray-painted the building with messages such as “Kill Fascists” and “Kill Trump.”

RELATED: Sanders criticizes immigration ban for what it says about American values

https://twitter.com/michael_bodley/status/827005805513682944

UC Berkeley released the following statement:

“Amid violence, destruction of property and out of concern for public safety, the University of California Police Department determined that it was necessary to remove Milo Yiannopoulos from the campus and to cancel tonight’s scheduled 8 p.m. performance.

“The decision was made at about 6 p.m., two hours before the event, and officers read several dispersal announcements to the crowd of more than 1,500 protesters that had gathered outside of the Martin Luther King, Jr. ASUC venue.

“We condemn in the strongest possible terms the violence and unlawful behavior that was on display and deeply regret that those tactics will now overshadow the efforts to engage in legitimate and lawful protest against the performer’s presence and perspectives.”

Protests against Trump’s policies, including last Saturday’s massive turnout at airports in multiple major U.S. cities to decry the administration’s immigration ban, have mostly been peaceful. Yiannopoulos said on Facebook of Wednesday’s violence that “the Left is absolutely terrified of free speech and will do literally anything to shut it down.”

What do you think?

From fashion designer to First Daughter: Getting to know Ivanka Trump

A Donald Trump supporter was complimenting protesters when someone came up and sprayed her in the face