Speeches by far-right commentator Milo Yiannopoulos and former pharmaceutical executive Martin Shkreli were canceled after heated protests erupted at the University of California, Davis.

The school's student-run Republican group called off the talk on Friday night after large crowds gathered outside the Science Lecture Hall, shouting 'shut it down'.

According to KCRA.com club leaders canceled the event after consulting with the UC Davis Police Department.

'The decision was made initially because the lives of the officers were threatened, the lives of the students were threatened as well as the property of the school,' Executive Director of the Davis College Republicans Andrew Mendoza said.

Interim Chancellor Ralph J. Hexter said he was 'deeply disappointed' by the outcome and emphasized the importance of engaging with opposing views, 'especially ones that many of us find upsetting or even offensive.'

Heated protests erupted at the University of California, Davis. Martin Shkreli is seen center. He posed for selfies with fans

Speeches by far-right commentator Milo Yiannopoulos and former pharmaceutical executive Martin Shkreli were canceled due to the protests

Protesters blocked access to the venue, and several students held a banner that read: 'Hey you, your fascism is showing'

Martin Shkreli spoke to reporters outside the building and was later called a 'piece of sh**' and had what appeared to be dog feces thrown in his face, Wang wrote

Shkreli posed for selfies with fans, and claimed he was going to serve as a counterpoint to Yiannopoulos' 'anti-feminism' and 'tear him to shreds'

The Davis College Republicans consulted with the campus police and other school officials and cancelled the event at 7pm, half an hour before it was scheduled to start.

Protesters blocked access to the venue, and several students held a banner that read: 'Hey you, your fascism is showing'.

In photos and videos posted by ABC10 reporter Frances Wang, Shkreli posed for selfies with fans, and claimed he was going to serve as a counterpoint to Yiannopoulos' 'anti-feminism' and 'tear him to shreds'.

He was later called a 'piece of sh**' and had what appeared to be dog feces thrown in his face, Wang wrote on Twitter.

Hexter issued a statement on Wednesday, announcing a 'safety plan' had been established in preparation for the event on Friday.

He defended the First Amendment, and told students: 'I suggest, for your consideration, that one strategy for disabling [Yiannopoulos'] message is simply not to attend.'

On Friday, he said he was 'deeply disappointed' by the outcome, and wrote: ' As I have stated repeatedly, a university is at its best when it listens to and critically engages opposing views, especially ones that many of us find upsetting or even offensive.'

Yiannopoulos (file photo) is the darling of the alt-right movement, an offshoot of conservatism mixing racism, white nationalism and populism

Yiannopoulos attributed the cancellation to 'violence from left-wing protesters' on Facebook

But the school issued a statement that said: 'Despite some reports, there were no broken windows or other property damage during the protest'

Yiannopoulos attributed the cancellation to 'violence from left-wing protesters' on Facebook.

He said: 'There are reports of hammers, smashed windows and barricades being torn away. The campus police can't guarantee anyone's safety so I'm not being allowed anywhere near the building. Stay safe, everyone.'

But the school issued a statement that said: 'Despite some reports, there were no broken windows or other property damage during the protest.

'Earlier in the evening, one person was arrested inside the venue. No further arrests were made.'

Yiannopoulos is the darling of the alt-right movement, an offshoot of conservatism mixing racism, white nationalism and populism.

He often refers to feminism as 'a cancer' and was permanently banned from Twitter after leading a harassment campaign against 'Ghostbusters' actress Leslie Jones.

Martin Shkerli, 33, (left) had his Twitter account suspended on Sunday after he 'harassed' Teen Vogue writer Lauren Duca (right)

Duca rejected the pharmaceutical boss's invite to Trump's inauguration. She responded by saying she would 'rather eat [her] own organs'

Martin Shkreli, was the former CEO of Turing Pharmaceuticals, increased the price of price of a life-saving drug from $13.50 to $750 after his company acquired it.

Shkreli was suspended from Twitter last week after harassing a Teen Vogue writer Lauren Duca, after she turned down his invitation to Trump's inauguration.

He was looking for a date to the president elect's ceremony on January 20 and asked the journalist if she would join him over a social media direct message.

In a scathing refusal, she tweeted out her response to her 129k followers which said: 'I would rather eat my own organs'.

He then filled his account with photos of the 25-year-old - including one picture where Shkreli photoshopped his face over her husband's.