American colleges used to pride themselves on their commitment to free speech and free inquiry. That’s the only way learning takes place, we thought, and you’d have to go back to the Dark Ages to find people who disagreed. Only now the Dark Ages have returned, with college speech codes, barking-mad left-wing student mobs and faculties that refuse to hire open conservatives.

This week, President Trump took a big step to stop the madness with one of the most important speeches of his presidency.

Trump signed an executive order to authorize the denial of federal funds to colleges that suppress student free-speech rights. Students who’d expressed conservative ideas, planted crosses for aborted children or passed out Valentine’s Day cards saying “Jesus Loves You” have been denounced by angry professors or sent off to free-speech zones.

No more, said Trump. The federal government awards billions to our universities; top schools get a billion apiece. That’s going to stop, he said, if they don’t honor free-speech rights.

To drive the point home, he had both Education Secretary Betsy DeVos and Health and Human Services Secretary Alex Azar in the room. The Education Department runs the student loan program, but most of the money the feds spend on higher ed comes out of HHS.

It’s going to be fun to watch the critics on the left turn themselves in circles about this. These were the people who 50 years ago defended free-speech rights on campus when professors were asked to sign loyalty oaths. That’s against the First Amendment, they said. But when the shoe is on the other foot, when the same people became deans and professors, they turned around to silence conservative voices.

Now I’m waiting to hear them tell us that there’s a First Amendment problem with Trump’s executive order, that if you take the time to understand things through the proper social justice prism, the First Amendment really bans free speech.

Trump said the executive order is just a first step, and so it is. In time it’s going to drive a stake at the heart of the corrupt bargain in modern university education.

Formerly university administrators monitored the professoriate and fired the crazies. Today, however, the bargain takes this form: You let us pay ourselves million-buck salaries, say the college presidents, and we won’t bother you. Teach whatever you want, and get your jollies from attacking conservatives, it’s all the same to us.

Except that won’t continue if there’s a financial penalty to the suppression of the political and religious beliefs of college students.

The recent scandals where parents paid to get their kids into a good college should disabuse you of the notion that head-in-the-clouds academics don’t pay attention to filthy lucre. The truth is that nobody lusts for money more than college administrators, and you can be sure they took notice of Trump’s speech.

Who knows, the college presidents might even realize that there’s something to be said for a bit of intellectual diversity among the faculty. The reason why the intolerant liberal bully feels free to humiliate conservative students is because he’ll never encounter a conservative colleague. If he did, you’d see less extremism and fewer academic lynch mobs.

But I’m saving the best for last. Trump noted that current student indebtedness exceeds $1 trillion, with 43 million people owing an average of $35,000 in student debt. Some students owe as much as $200,000 and will never be able to dig themselves out. The universities took the federal loan program and used it as an excuse to run up tuition far in excess of the cost of living, and then gave their students a social justice education that made them unemployable.

Trump said that he wants to rescue the highly leveraged students of today from what amounts to debt slavery. How to do so? Right now students can’t discharge their educational loans in bankruptcy, and that would have to change. Better still, Trump wants the colleges to bear some of the cost of default. “They have to have skin in the game,” he said. They have to care about making their students employable.

That won’t hurt universities that keep tuition low and whose students get jobs. The community colleges, the decent state schools — they won’t be affected. As for high-cost, social justice-focused schools that make their kids unemployable, it’ll be good to see them pay a price.

F.H. Buckley teaches at Scalia Law School, and is the author of “The Republican Workers Party: How the Trump Victory Drove Everyone Crazy, and Why It Was Just What We Needed.”