Donald Trump signed an executive order Thursday requiring US colleges to protect free speech on their campuses or risk losing federal research funding.

The new order directs federal agencies to ensure that any college or university receiving research grants agree to promote free inquiry and to follow federal rules and regulations supporting free speech.

“Even as universities have received billions and billions of dollars from taxpayers, many have become increasingly hostile to free speech and to the first amendment,” Trump said at a White House signing ceremony. “These universities have tried to restrict free thought, impose total conformity and shut down the voices of great young Americans.”

The order follows a growing chorus of complaints from conservatives who say their voices have been stifled on campuses across the US. Joining Trump at the ceremony were students who said they were challenged by their schools while trying to express views against abortion or in support of their faith.

Trump initially proposed the idea during a 2 March speech to conservative activists, highlighting the case of Hayden Williams, an activist who was punched in the face while recruiting for the group Turning Point USA at the University of California, Berkeley. He invoked the case again Thursday, noting that Williams was hit hard “but he didn’t go down”.

Under the order, colleges would need to agree to protect free speech in order to tap into more than $35bn a year in research and educational grants.

For public universities, that means vowing to uphold the first amendment, which they’re already required to do. Private universities, which have more flexibility in limiting speech, will be required to commit to their own institutional rules.

“We will not stand idly by to allow public institutions to violate their students’ constitutional rights,” Trump said. “If a college or university doesn’t allow you to speak, we will not give them money. It’s very simple.”

Enforcement of the order will be left to federal agencies that award grants, but how schools will be monitored and what types of violations could trigger a loss of funding have yet to be seen. White House officials said details about the implementation will be finalized in coming months.

Many colleges have firmly opposed the need for an executive order. Following Trump’s speech, Janet Napolitano, the president of the University of California, said many schools are “ground zero” for the exchange of ideas.

“We do not need the federal government to mandate what already exists: our longstanding, unequivocal support for freedom of expression,” she said. “This executive order will only muddle policies surrounding free speech, while doing nothing to further the aim of the first amendment.”

The American Council on Education, which represents more than 1,700 college presidents, called the order “a solution in search of a problem”.

“No matter how this order is implemented, it is neither needed nor desirable, and could lead to unwanted federal micromanagement of the cutting-edge research that is critical to our nation’s continued vitality and global leadership,” said Ted Mitchell, the organization’s president.

The education secretary, Betsy DeVos, who has spoken against a government answer to campus speech issues, issued a statement that only briefly mentioned free speech, and instead largely focused on another part of the order dealing with transparency in college performance data.

Her statement said students “should be empowered to pursue truth through the free exchange of all ideas, especially ideas with which they may not agree. Free inquiry is an essential feature of our democracy, and I applaud the president’s continued support for America’s students.”

The order was supported by conservative groups including Turning Point USA, which has pushed for action on the issue. In Trump’s speech, he specifically thanked Charlie Kirk, the group’s founder. On Twitter, Kirk called the order “historic”, adding that while harassment by campus faculty is not uncommon, “it ends today!”

Several free speech groups opposed the order, including the American Civil Liberties Union, which took issue with “the partisan nature of the administration’s rollout of this executive order”.

The top Republican on the Senate education committee, Lamar Alexander, said he supports the push for free speech but raised concerns about Trump’s approach.

“I don’t want to see Congress or the president or the department of anything creating speech codes to define what you can say on campus,” said Alexander. “The US constitution guarantees free speech. Federal courts define and enforce it. The Department of Justice can weigh in.”

Debate over campus free speech has flared in recent years following a string of high-profile cases in which protesters shut down or heckled conservative speakers, including at UC Berkeley and Middlebury College in Vermont. Republicans called hearings on the issue when they controlled both chambers, but proposed legislation backing campus speech never made it through committee.

Some colleges’ leaders have said they worry the order could backfire. If a speaking event threatens to turn violent, for example, some say they might have to choose between canceling the event for safety and allowing it to continue to preserve federal funding. Some say it could force religious universities to host speakers with views that conflict with the universities’ values.

Still, the order has gained support from some religious institutions including Liberty University, a Christian school in Virginia whose leaders say they denounce censorship of either the left or right.

Separate from the free speech requirement, the order also calls for several measures meant to promote transparency in the student loan industry and in how well colleges prepare students.

By January 2020, Trump is directing the education department to create a website where borrowers can find better information about their loans and repayment options, and he’s calling on the agency to expand its College Scorecard website to include data on the graduates of individual college programs, including their median earnings, loan debt and their default rates.

Trump is also is asking the education department to prepare a policy that would make sure colleges “share the financial risk” that students and the federal government take on with federal student loans.