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

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

“If UC Berkeley does not allow free speech and practices violence on innocent people with a different point of view -- NO FEDERAL FUNDS?” he wrote.

The riots Wednesday 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, Yiannopoulos is also an editor at Breitbart News, the far-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 during Trump’s first two weeks in office.

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

Yiannopoulos said the protests against his speech at the school were “ironic and sad” and called university students and personnel “no friends to free speech any more.”

School officials canceled the speech 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 including “Kill Fascists” and “Kill Trump.”

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."

“It turns out that the progressive left, the social justice left, the feminist, Black Lives Matter ... the hard left, which has become so utterly anti free speech in the last few years, has taken a turn post Trump's election, where they simply will not allow any speaker on campus ... to have their voice heard,” Yiannopoulos said. “They won't allow students to listen to different points of view ... The fact that on an American college campus -- a place of higher education, a place of learning in America, which I've come to as a visitor from the United Kingdom, where we don't have a First Amendment, hoping that this would be somewhere where you could be, do say anything, where you could express your views, express your opinions ... free from violent responses to political ideas, I thought America was the one place where that could be possible.”