For more news videos visit Yahoo View, available now on iOS and Android.

Los Angeles (AFP) - President Donald Trump threatened Thursday to withdraw federal funds from UC Berkeley after violent campus protests forced the cancellation of a speech by Milo Yiannopoulos, a firebrand editor of right-wing news site Breitbart.

The disturbances were a fiery reminder of the university's history as a cradle of the 1960s anti-war movement -- and a sign of the sharp tensions pitting America's mostly left-wing student body against a far-right minority.

Hundreds of students and other protesters chanting "shut him down" smashed windows at the University of California campus, set wooden pallets ablaze and threw fireworks and rocks as police in full riot gear responded with tear gas.

The university was placed on lockdown as the sold-out appearance by Yiannopoulos, a conservative provocateur and self-proclaimed internet troll who styles himself on Facebook as "Dangerous Faggot," was canceled Wednesday evening.

"If U.C. Berkeley does not allow free speech and practices violence on innocent people with a different point of view - NO FEDERAL FUNDS?" Trump wrote on Twitter Thursday.

About half of research at Berkeley is funded by the federal government, according to the university website. Berkeley however has been struggling in the past years with budget shortfalls and spending deficits.

Trump's top political adviser Stephen Bannon is the former chairman of Breitbart News.

- 'Dangerous Faggot' -

Yiannopoulos, Breitbart's technology editor, is a flamboyant firebrand reviled by his critics as racist and misogynistic but who casts himself as a gay crusader against "political correctness."

He is often portrayed as a leader of the so-called alt-right -- a white nationalist extremist fringe that has found a home on Breitbart's pages -- although he has sought to distance himself from the movement.

He is however a vocal supporter of Trump -- nicknaming the billionaire "Daddy" during his election campaign.

Story continues

The 32-year-old Briton is probably best known for inciting a campaign of online abuse against the African-American "Ghostbusters" actress Leslie Jones. Twitter banned him in July.

The Berkeley event was to be the last stop of a college speaking tour that has drawn big crowds and also sparked fistfights, a shooting and at least one other cancellation.

According to an article on Breitbart News, Yiannopoulos was planning to use the event to launch a campaign against so-called sanctuary campuses, which have declared their opposition to Trump's tough stance toward undocumented immigrants.

Yiannopoulos said on Facebook he was evacuated "after violent left-wing protestors tore down barricades, lit fires, threw rocks and Roman candles at the windows and breached the ground floor of the building."

"One thing we do know for sure: the Left is absolutely terrified of free speech and will do literally anything to shut it down."

UC Berkeley, one of the top public universities in the United States, is the home of the 1960s "Free Speech Movement" that helped launch the era's student protests against the Vietnam War.

- Violence deplored -

The mayor of Berkeley, one of America's most liberal cities, deplored the violence by a "small minority" of protesters.

They "provided the ultra-nationalist far right exactly the images they want to use to discredit the vast majority of peaceful protesters in Berkeley and across America who are deeply concerned about where the country is heading," said Jesse Arreguin, the mayor.

Similar protests at the University of California at Davis last month also forced the cancellation of speeches by Yiannopoulos and Martin Shkreli, a former pharmaceuticals boss who became a hate figure after jacking up the price of a life-saving drug.

The events at Davis and Berkeley were organized by conservative student groups. A similar invitation to speak at UCLA was rescinded.

Officials at the three University of California campuses stressed that they did not invite Yiannopoulos or endorse his ideas but were committed to free speech.

More than 100 UC Berkeley faculty members had signed two letters sent last month to the school's chancellor, urging him to cancel the event.

"Although we object strenuously to Yiannopoulos's views -- he advocates white supremacy, transphobia and misogyny -- it is rather his harmful conduct to which we call attention in asking for the cancellation of this event," read one of the letters.

They cited as one example an incident in December at the University of Milwaukee where Yiannopoulos openly mocked a transgender student, displaying her name and photo on screen.