WASHINGTON — President Donald Trump signed an executive order Thursday that would withhold federal research and education funds from colleges if they don't certify that they will protect free-speech rights on campus.

"We’re here to take historic actions to defend American students and American values," Trump said at the White House. "They’ve been under siege."

Colleges and universities spend as much as $40 billion in federal research and development dollars annually, according to the National Science Foundation, a total which doesn't include higher education grants that would also be subject to the executive order. A senior administration official said federal financial aid for tuition would not be affected by the action.

Public colleges and universities are already required to abide by the First Amendment.

Trump took a similar approach to try to cut off Justice Department grants to so-called sanctuary cities that do not cooperate with federal immigration authorities. But that executive order has been ruled unconstitutional by multiple federal courts.

The idea that universities are cracking down on conservative thought and speech has become a cause celebre on the political right, and one that Trump has taken up as a major political issue as he heads into his re-election campaign.

In recent weeks, he has focused attention to an altercation on the campus of the University of California at Berkeley, in which an organizer for the conservative group Turning Point USA was punched while "tabling" — or providing information — to students on campus. Neither the student who was punched nor the person charged in the incident, who pleaded not guilty, are students at the school.

The university has called the discussion around the incident "willfully distorted and inaccurate."

Trump talked about the incident Thursday.

"You see people being punched hard in the face, but he didn’t go down," the president said. "I said, 'you have a better chin than Muhammad Ali.'"

In his remarks, Trump made little distinction between universities.

"Taxpayer dollars should not subsidize anti-First Amendment institutions, and that’s exactly what they are: anti-First Amendment," he said. "Universities that want taxpayer dollars should promote free speech, not silence free speech."