SACRAMENTO, Calif. (Reuters) - U.S. President Donald Trump does not have the authority to withhold funding from the University of California at Berkeley where violent protests led to the cancellation of a speech by a far-right editor, academics and experts said on Thursday.

Two demonstrators hold signs as they face a police line after a student protest turned violent at UC Berkeley during a demonstration over right-wing speaker Milo Yiannopoulos, who was forced to cancel his talk, in Berkeley, California, U.S., February 1, 2017. REUTERS/Stephen Lam

Trump threatened to cut funds for the university’s flagship Berkeley campus in a Twitter posting accusing the institution of failing to support free speech and practicing violence against innocent people.

But academics and experts interviewed by Reuters said state universities mostly receive federal funds in the form of research grants and financial aid to students, and these cannot be revoked for reasons related to freedom of speech.

“There is nothing in current legislation that would allow President Trump to do that,” said Don Heller, a provost at the University of San Francisco and an expert in public education financing.

UC Berkeley receives between $400 million and $450 million annually in federal funding for research, and about $216 million for student financial aid, officials said.

Some of that can be withheld but only in very specific circumstances, such as the publication of fraudulent research or the refusal of a university to comply with the Title IX law that prohibits discrimination on the basis of sex in educational programs.

To add freedom of speech to that list of offenses would take new legislation in Congress, Heller and other experts said.

And even if such a law were passed, Berkeley’s situation would be highly unlikely to be affected, said Terry Hartle, vice president for Government and Public Affairs at the American Council on Education.

That is because in Berkeley’s case, the university had attempted to facilitate the speech on Wednesday night, cancelling it only after police became concerned about safety.

Slideshow ( 2 images )

“Because the crowd had grown so violent and agitated, it was our recommendation to the speaker that his public safety was in jeopardy,” UC Berkeley police department spokeswoman Sergeant Sabrina Reich said in a telephone interview.

“NO FEDERAL FUNDS?”

Milo Yiannopoulos, an editor at Breitbart News, was escorted by police from the campus as a relatively small group among the 1500 protesters smashed windows and set fires and the campus was put on lockdown. There were no injuries.

Yiannopoulos has been a provocative figure on the internet for years, and has been widely criticized for comments he has made about Muslims, Black Lives Matter activists and feminists.

Trump, whose aide Steve Bannon previously ran the right-wing, nationalist Breitbart site, tweeted his response shortly before dawn in Washington on Thursday.

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

His administration was not immediately available for further comment on Thursday.

Longer-term, there were some steps a Trump administration could take that would affect the university.

For instance, the Department of Energy could conceivably seek to relocate the Lawrence Berkeley National Laboratory, which is in the hills above the campus and is managed by the University of California, said Bob Shireman, a former deputy undersecretary for education in the Obama administration.

“There are things that if a president really wanted to punish some particular college they could influence those decisions but it would take a long time and there would be a lot of reaction,” said Shireman, a senior fellow at the Century Foundation.