Note: This article contains explicit and potentially offensive terms that are essential to reporting on this situation.

The cases were similar and the punishment was the same.

Not even three years ago, many Americans applauded as the University of Oklahoma kicked out two fraternity members for their role in helping lead a racist chant that was recorded and went viral. But despite popular support for that decision and the shuttering of the campus chapter of Sigma Alpha Epsilon, legal experts said the institution had actually flouted the students’ First Amendment rights, which protects even the vilest of speech.

Now, a student at the University of Alabama has been expelled after she posted videos to Instagram rife with racial slurs, also earning her national condemnation. The same arguments arise again -- did the university, a public institution operating as a government representative, break the law?

“I think the student would have a strong case for suing the University of Alabama for violating her First Amendment rights,” said Erwin Chemerinsky, a constitutional scholar and dean of the University of California, Berkeley, School of Law. “Her speech is protected by the First Amendment, though it is offensive and uses epithets.”

The student, Harley Barber, published videos to Instagram on Martin Luther King Jr. Day. As she stands near a sink in an initial video, she says that “we don’t waste water because of people in Syria.”

“I love how I act like I love black people, because I fucking hate niggers,” Barber rants in the video, repeating the epithet multiple times.

In a second post, seemingly responding to critics of the first video, Barber says that she’s wanted to join her sorority, Alpha Phi, since high school (as a result of the backlash, she has since been removed from the sorority). She looks directly at the camera and declares that she “doesn’t care if it’s Martin Luther King Day” and screams “nigger” over and over.

“I’m in the South now, bitch,” she says.

The university told reporters that the videos had been referred to its Office of Student Conduct. Then, on Wednesday, President Stuart R. Bell released a statement saying Barber was no longer enrolled and that he found the videos “highly offensive and deeply hurtful.”

“We hold our students to much higher standards, and we apologize to everyone who has seen the videos and been hurt by this hateful, ignorant and offensive behavior,” Bell said in his statement. “This is not who we are. It is unacceptable and unwelcome here at UA.”

Barber has not given any interviews except to The New York Post, in which she apologized profusely.

“I feel horrible,” she told the Post. “I feel so, so bad and I am so sorry.”

Courts have determined that though colleges and universities can discipline students for speech they consider threatening or harassing, they cannot punish them simply because the speech is offensive.

In Papish v. Board of Curators of the University of Missouri, for instance, the U.S. Supreme Court decided in 1973 that Barbara Papish, a graduate student, shouldn’t have been dismissed for distributing a newspaper with a crude cartoon showing policemen raping the Statue of Liberty and the goddess of Justice, with the headline “Motherfucker Acquitted.”

“State colleges and universities are not enclaves immune from the sweep of the First Amendment,” the justices wrote in another free speech case, cited in their decision in Papish.

Colleges have argued that displays such as Barber’s constitute prejudice that -- per Title VI of the U.S. Civil Rights Act -- institutions must quash.

University of Oklahoma president David Boren alluded to the law when he booted the former Sigma Alpha Epsilon brothers for their racist song. It was sung to the tune of “If You’re Happy and You Know It,” replacing the title and what follows with “there will never be a nigger in SAE.”

“You will be expelled because of your leadership role in leading a racist and exclusionary chant which has created a hostile educational environment for others,” Boren wrote in the students’ expulsion letters.

It is unclear what piece of Alabama’s student conduct code Barber may have violated. University spokeswoman Monica Watts said federal privacy laws prohibited Alabama from commenting further. The conduct code describes harassment as any communication -- face-to-face, written or electronic -- that discriminates, is directed at an individual and is “so severe, pervasive or objectively offensive that a reasonable person with the same characteristics of the alleged victim would be adversely affected.” This is in line with the definition determined by the Supreme Court.

The policy also prohibits cyberbullying -- behavior designed to “intimidate or intentionally harm or control another person or group.”

Despite Barber’s offensive statements, organizations and individuals that support civil liberties have called for Bell to reverse his decision.

Former officials with the American Civil Liberties Union wrote to Bell, urging him to reconsider.

The letter is signed by Ira Glasser, former ACLU national executive director; Norman Siegel, past executive director of the New York branch of ACLU; and Michael Meyers, president and executive director of the New York Civil Rights Coalition and a former ACLU vice president.

The men wrote that the impulse to punish Barber is understandable from an emotional standpoint. But they pointed out that at different times in history what has been deemed “offensive” has shifted. In the 1960s, during the peak of the civil rights movement, the sight of King and his followers marching on certain Southern streets deeply troubled the locals -- and the protesters were arrested. The First Amendment was invoked to stop state agencies from interfering.

“But if the First Amendment allows the state to punish someone for ugly remarks that are profoundly offensive, as in this case, then it acquires the power to do the same for other speech that is offensive to those in power,” they wrote.

The Foundation for Individual Rights in Education, or FIRE, a watchdog group in academe, also railed against the university.

Ari Cohn, a lawyer and director of FIRE’s individual rights defense program, wrote that Barber’s behavior does not qualify as harassing. Lesbian, gay, bisexual, transgender and queer people may find opposition to same-sex marriage offensive, Cohn wrote, but that does not mean that that opinion isn’t protected by the First Amendment.

“To be sure, many are certainly outraged and offended by Barber’s speech. But any argument that Barber’s expressions deprives [sic] UA students of access to the university’s educational opportunities or benefits collapses under its own weight,” Cohn wrote.

Robert O’Neil, a First Amendment expert, former president of the University of Virginia and senior fellow with the Association of Governing Boards of Universities and Colleges, offered a dissenting opinion.

He said that given the intensity of Barber’s offense, he could see justification for her expulsion.

“Particularly, Martin Luther King Day makes it worse,” O’Neil said.

Students who have been accused of racism and then penalized by their universities have won court battles.

The George Mason University chapter of Sigma Chi fraternity filed a lawsuit against the institution in the early 1990s after the brothers held an “ugly women contest” in which one of them dressed up as the caricature of a black woman, with his face painted and a stringy wig adorned with curlers on his head.

The skit was decried as sexist and racist, and public pressure mounted for George Mason administrators to act. They eventually suspended the fraternity from social activities for the rest of the spring 1991 semester and put it on probation for two years.

Sigma Chi sued to get the sanctions removed, and a district court sided with the fraternity. The university appealed, but the U.S. Court of Appeals for the Fourth Circuit also agreed with Sigma Chi, citing free expression considerations.

“A public university has many constitutionally permissible means to protect female and minority students. We must emphasize, as have other courts, that ‘the manner of [its action] cannot consist of selective limitations upon speech,’” the appeals court wrote. “The university should have accomplished its goals in some fashion other than silencing speech on the basis of its viewpoint.”

A Georgia State University freshman, Natalia Martinez, also recently left her institution after she posted a racial epithet on social media. She was initially just suspended from the soccer team there, but later withdrew from the university.