The free-speech rights of students have been much in the news, including for events on the UC Irvine campus, but so much of the discussion is based on fundamental misunderstandings about the First Amendment. The decision of the University of Oklahoma to expel two students for a racist chant is clearly unconstitutional. But the issue of whether there will be flags in the UC Irvine student government center does not raise a First Amendment question at all.

The First Amendment is implicated whenever the government regulates or punishes speech. Of course, that does not mean that the government always loses; freedom of speech is not absolute. There are categories of speech that the Supreme Court has said are not protected by the First Amendment – most notably, incitement of illegal activity, obscenity, child pornography and defamatory speech. Also, there is no right to engage in speech that causes others to reasonably fear for their safety; “true threats” are not protected by the First Amendment.

But there is no exception to the First Amendment for racist speech. The court has made it clear that the First Amendment protects even very offensive racist, sexist and homophobic speech. In a 1992 case, the Supreme Court unanimously declared unconstitutional a city’s ordinance that prohibited burning a cross or painting a swastika in a manner likely to anger, alarm or cause resentment. In another case, in 2003, the court declared unconstitutional a Virginia law that prohibited cross burning.

These cases reflect a larger and more basic principle: The government cannot punish speech because it is offensive, even deeply offensive. A few years ago, for example, the court held that protesters had a right to go to military funerals and use them as the occasion for expressing vile anti-gay and anti-lesbian messages. In this 8-1 decision, the court once more stressed that speech cannot punished or be the basis for liability even when it very much upsets and offends people.

This is exactly the way that it should be. We don’t need the First Amendment to protect the speech the majority of us like. Society would allow that to occur anyway. The First Amendment is needed for speech that the majority detests and wants to eliminate.

University of Oklahoma President David Boren was acting out of the best intentions in expelling the two students who led the racist chants on a bus during a fraternity outing. The chant was horrible. But expelling the students violated their First Amendment rights. It is not a close question; if the students choose to sue, they will win.

President Boren said the students could be punished because their speech created a hostile environment for minority students. But no case ever has held that as a sufficient basis for punishing racist speech on campus. In fact, many court decisions have held exactly the opposite. Over 200 colleges and universities adopted hate-speech codes designed to prevent hate speech. Every court to consider such a code declared it unconstitutional as violating the First Amendment.

President Boren certainly could condemn, in the strongest terms, the racist speech. But expelling students on account of their expressing a vile message cannot withstand constitutional scrutiny.

By contrast, no First Amendment issue was raised when a committee voted to remove flags from the sitting lounge of UC Irvine’s student government center or when their decision was overturned and flags returned. There is no First Amendment problem if a university were to require flags to be placed in its buildings. The government is not regulating the speech of students; rather, it is just deciding what it wants to display on its own property.

The flag controversy at UCI was widely misreported. I read news stories, and received hate messages, that the UC Irvine campus had banned the flag. Of course, nothing like this happened. Apparently, sometime in mid-January, a flag was tacked to a wall in the student government center. A disagreement developed among students about whether to leave it up. On March 5, by a vote of 6-4, the student government’s Legislative Council passed a resolution banning the display of any flags in the lounge. Very quickly, the Executive Council overrode this decision. But by then it attracted national attention, and I received countless calls about the First Amendment aspects of the controversy.

There are none. No one was punished for his or her speech. No one’s speech was restricted. In fact, if the campus or the state wants to require American flags in university buildings, it can do that without raising any constitutional issues.

Perhaps what has most been lost in both controversies is the recognition that college campuses are very special places for speech and expression. They are places where all ideas, even distasteful ones, can be expressed. That is what the First Amendment is all about.

Erwin Chemerinsky is dean of the UC Irvine School of Law.