After heated protests resulted in the cancellation of a Milo Yiannopoulos speaking event at a California university, the infamous far-right Internet troll warned higher learning institutions that President Donald Trump is “watching”.

About 1,500 demonstrators gathered on the University of California, Berkeley, campus ahead of Yiannopoulos’ scheduled visit. A small group of anti-fascist agitators vandalised a segment of the campus, causing police to shut down the event.

The President responded to the events of the evening on Twitter, and appeared to threaten Berkeley – a university with a strong history of activist presence – with pulling federal funding.

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

Yiannopoulos, who publicly outed and harassed a transgender woman at his last public speaking engagement, accused the protesters of trying to quash free speech that did not match their ideals.

“American universities should be on notice,” he told Business Insider. “The president is watching. The days you could silence conservative and libertarian voices on campus and still expect to collect their tax money are coming to an end.”

Yiannopoulos rose to notoriety as a columnist for Breitbart, the website run by Trump adviser Stephen Bannon. The site has been hailed as a platform for the white supremacist alt-right group, which has risen into mainstream politics in the wake of Mr Trump’s victory. Much of the content written by Yiannopoulos is overtly anti-woman, anti-Muslim, and racist.

When Yiannopoulos appeared at the University of Washington in Seattle, it also drew protesters. One anti-fascist activist was shot in the stomach. The alleged shooter, who identified himself to local police as a 29-year-old former UW student, has not been charged with a crime.

The Seattle Times said he had sent Yiannopoulos a Facebook message before the event.

“Hey Milo,” the man wrote. “I’m outside in line to your UW event. I got sucker punched (he was a bit limp wristed) and someone jacked my [Make America Great Again] hat.

“Any way for me to get a replacement signed by you?”