A lawyer on staff at a Texas university used a racial slur during a panel discussion about free speech — and resigned from her post the next day, according to reports.

University of North Texas assistant general counsel Caitlin Sewell used the n-word during a Thursday night event that was meant to give students an understanding of civil discourse and the type of language protected under the First Amendment, FOX 4 reported.

“Gonna say a lot of offensive things in here, because it’s impossible to talk about the First Amendment without saying horrible things,” Sewell said during the discussion, which a student in the crowd recorded. “Um, you know, ‘You’re just a dumb n—-r and I hate you.’ That alone, that’s protected speech.”

Stephanie Gaia, a senior at the school who was in attendance, said she was shocked that the slur left Sewell’s mouth.

“She used it as an example. She said it with the hard ‘r,’ no hesitation,” Gaia told the outlet. “Everyone was just so taken aback, so shocked. No one knew what to say.”

Several students became enraged — despite Sewell’s efforts to defend herself.

“I just want to sincerely apologize. I did not mean to by any means offend anyone,” she said, according to a video posted to Twitter. “I wish I had censored that word, it came out without thought. I sincerely apologize.”

“I literally have never said that word in a public setting before,” she added. “I did not mean to, I was trying to be real.”

But students noted that she had censored her use of the word “f–k” at the event, according to the campus newspaper North Texas Daily.

“So, you didn’t censor the n-word, but you definitely censored f—k,” student government association senator Daniel Ojo told the paper. “Like, what’s more damaging to people? There is no word that I can say to describe a white person that is completely damaging to their character … that has like big historical context to it that can damage someone, but there are a plethora of words that can describe and damage minor marginalized students.”

In a statement issued to FOX 4, University president Neal Smatresk confirmed that Sewell had issued her resignation Friday.

“We strongly believe in a culture that embraces, and vehemently defends inclusion,” Smatresk said. “While Ms. Sewell was trying to make a point about First Amendment speech, the references used are never condoned in our community, which prides itself in our diversity and caring nature.”

Student Chaz Kennedy told the station he understood where Sewell was coming from — using a “hypothetical situation” — but “would have said, like, another example.”