University of Oklahoma President David Boren has expelled two members of the Sigma Alpha Epsilon fraternity on his campus for leading a horrifying racist chant. Does his decision violate their First Amendment rights? And if it does, what’s wrong with this picture, in which a public university wouldn’t be able to sanction students who not only bar blacks from their organization, but also refer to lynching in the process?

A public university is bound by the First Amendment because it’s an organ of the state. Admittedly, there is something weird about this fact, because a public campus isn’t inherently different from a private one with respect to educational function and goals. Some strange free-speech anomalies can arise from treating a university like the government. For example, professors sanction speech based on its content all the time, by grading wrong answers lower than right ones. But usually free speech bars such content discrimination.

Discipline is another anomaly. A university is meant to be a community of learning, and making such a community work requires rules of decorum that are more restrictive than those that should apply in the public square. The First Amendment generally guarantees us the right to yell, scream, insult, offend, condemn and denounce. None of these forms of speech belong in the classroom, and few belong on a well-functioning campus.

In a perfect world, there might be a broad First Amendment exemption for public campuses. But there isn’t — so Boren’s decision has to be judged by First Amendment standards.

Applying ordinary free-speech doctrine, the expulsion looks unconstitutional, as professor Eugene Volokh has pointed out. Racist speech is still protected speech under the First Amendment, no matter how repulsive. The fraternity can be banned for race discrimination, which is prohibited conduct. Speaking in favor of discrimination, however, is generally protected.

But Boren’s explanation for the expulsion rests on a different theory. He said specifically that the students were being expelled for their “leadership role in leading a racist and exclusionary chant, which has created a hostile educational environment for others.”

The important words here are “hostile educational environment.” Under federal anti-discrimination law, as interpreted by the Department of Education, a university has an affirmative duty to guarantee students an educational environment in which they are free of hostility based on race or sex.

You may have heard about this principle in connection with Title IX, which prohibits discrimination based on sex. The law has similarly been interpreted by Education Department to require universities to protect students against a hostile educational environment based on sex discrimination, including sexual harassment.

In the business context, the analogy would be to an employer’s obligation to protect against a hostile workplace environment.

So Boren was saying that the students are being expelled not for their opinions per se, but because their speech was a form of discriminatory conduct that would create a hostile educational environment for black students. Given that the speech was literally designed to inculcate the value of racial discrimination by making pledges recite their commitment never to admit a black member to the fraternity, this conclusion seems plausible. Removing the chant leaders from campus is aimed to fulfill the educational goal of creating a nonhostile educational environment.

The legal logic here may seem slippery, but it’s well- established. Consider an ordinary workplace sexual harassment suit where co-workers have created a hostile environment by repeatedly making sexist comments such as “Women are unqualified for this job.” Why isn’t this discriminatory speech protected by the First Amendment as the expression of an opinion?

Outside the place of employment, the speech would be protected as opinion. But at work, we recognize the words as discriminatory conduct that incidentally happens to come in the form of speech.

The law doesn’t ban speech; it bans the act of discriminating. And when laws are aimed at conduct that incidentally burdens speech, the courts don’t subject them to the same strict scrutiny they apply to laws directed primarily at speech.

That’s what’s going on in Oklahoma. The university is enforcing the legal requirement of a nonhostile educational environment by barring racially hostile conduct. This conduct came in the form of speech — but it can still be prohibited because it was speech only incidentally.

It’s a tricky question whether speech not directed at anyone in particular should be treated as conduct creating a hostile environment. The Education Department says that “the acts may be directed at anyone” and still count. On the balance of the facts in Oklahoma, it seems plausible that the conduct would create a hostile environment even without being targeted at particular black students. This was not just a speech in favor of racism. The chant was trying to create an atmosphere of racial exclusion in the fraternity and hence on the campus.

In this case, the prevailing legal logic is good, because it enables (or even requires) the university to maintain standards of civility that are necessary for an educational community.

But if you’re still a little uncomfortable with the reasoning, that’s probably a good thing, too. Taken to extremes, the doctrine of the hostile educational environment could be used to limit academic freedom. After all, professors need to teach students about all sorts of uncomfortable facts and all kinds of nasty opinions — and students need to understand them. If the world of facts and ideas is treated as itself hostile, we’ll end up with a milquetoast curriculum, completely unsuited to our decidedly un-milquetoasty world.

The balance between a civil educational community and academic freedom is subtle and difficult. But the First Amendment should be read to allow universities like Oklahoma to find that balance for themselves.