In a late-night tweetstorm, Randa Jarrar taunted the chorus of people demanding that she be fired from her tenured position at California State University at Fresno after she called the recently deceased Barbara Bush “an amazing racist” and exulted, “I’m happy the witch is dead.”

“I will never be fired,” Jarrar wrote on Twitter.

To scores of critics, it was “challenge accepted.” They tagged Fresno State President Joseph I. Castro in tweets, and they emailed him and wrote editorials with a singular message: Jarrar’s words were horrible, and she should no longer be a professor at the university.

School officials said they were reviewing the tenured professor’s position, and Castro rebuked Jarrar, saying her remarks left him “shocked, upset, appalled just like everybody else.”

On Tuesday, Castro announced what the university would do about Jarrar’s words:

Nothing.

“Professor Jarrar’s conduct was insensitive, inappropriate and an embarrassment to the university,” he wrote in a five-paragraph statement. “I know her comments have angered many in our community and impacted our students.”

The university, Castro said, “carefully reviewed the facts and consulted with [lawyers] to determine whether we could take disciplinary action. … We have concluded that Professor Jarrar did not violate any CSU or university policies and that she was acting in a private capacity and speaking about a public matter on her personal Twitter account. Her comments, although disgraceful, are protected free speech under the First Amendment of the U.S. Constitution.”

It was an unsatisfying conclusion for those who argued that tenure should not absolve Jarrar — or anyone — from the consequences of their vitriolic words.

But Castro said tenure wasn’t the issue, writing in his statement that “this private action is an issue of free speech and not related to her job or tenure.”

Jarrar will be free to teach at Fresno State after a scheduled leave for the spring semester, Castro said.

The creative writing professor has not responded to requests for comment from The Washington Post, dating back to last week.

But she told New York magazine this week that she stands by her comments about the former first lady.

“I felt compelled to speak up because I want people to remember history,” she said. “I want people to know that our country’s actions don’t just disappear; they have real, negative consequences. If we want a better future, we have to confront our past.”

She told the magazine that she took issue with the Bush family’s legacy in Iraq and said that history can’t turn a blind eye to Barbara Bush’s critical comments about Anita Hill and her remarks that underprivileged Hurricane Katrina evacuees were “better off” sheltering in the Houston Astrodome.

“The Bush family — including Barbara Bush — supported policies that harmed and destroyed the lives of millions,” Jarrar said.

But the professor’s words on Twitter were not nearly so politic.

Shortly after the former first lady’s death last week, Jarrar published a flurry of tweets blasting Bush’s legacy.

“Barbara Bush was a generous and smart and amazing racist who, along with her husband, raised a war criminal,” Jarrar wrote, according to the Fresno Bee.

“I’m happy the witch is dead,” Jarrar wrote in another tweet. “Can’t wait for the rest of her family to fall to their demise the way 1.5 million iraqis have. byyyeeeeeee.”

More than 2,000 people replied to Jarrar before she made her Twitter account private, the Bee reported.

She called her critics “racists going crazy in my mentions” and said she was being attacked because she was “an Arab American Muslim American woman with some clout.”

Jarrar noted that she is a tenured professor who makes six figures and has rock-solid job security.

She even encouraged critics to contact university leaders:

“LOL let me help you. You should tag my president @JosephlCastro. What I love about being an American professor is my right to free speech, and what I love about Fresno State is that I always feel protected and at home here,” Jarrar wrote. “GO BULLDOGS!”

On Wednesday, critics blasted Fresno State for not punishing the professor, and called for alumni, donors and potential students to take notice.

After Fresno State tweeted out Castro’s decision, one man replied, simply: “My daughter will not be applying to Fresno State.”

Another man said that, although he is a proponent of free speech, “there is a matter of missing human decency and questionable quality of character not being addressed. [Jarrar] should at least be rebuked.”

The controversy raised a bigger question: How much does tenure protect a professor who says vitriolic or insensitive things?

The protections that faculty members have — designed to ensure they can tackle controversial and provocative ideas without fear of retribution — are bedrock principles in higher education.

But academic freedom and tenure are not a license to act in an unprofessional manner, said Terry Hartle, a senior vice president at the American Council on Education.

Speaking in general terms, and not about Fresno State specifically, Hartle told The Post that the further a faculty member gets from disinterested academic inquiry, “the more likely questions will be raised about academic integrity and professional judgment.”

Sigal Ben-Porath, a professor of education at the University of Pennsylvania, said Jarrar’s opinion was disrespectful and not thoughtful “about a person who just passed away and who a lot of people appreciated … but it was clearly protected under the First Amendment.”

Jarrar’s remarks have an additional layer of protection because she is a faculty member, said Ben-Porath, author of the recent book “Free Speech on Campus.”

Tenure is intended to promote a fundamental goal of universities: extending knowledge, she said.

“This is part of what we are expected to do as academics … not just work according to dogma, but push the boundaries of what is acceptable that people would say or think or consider,” she said. “That is what academic freedom is for.”

But that ideal is not always how it works, Ben-Porath added.

“There are strong efforts by organized groups online to target faculty as a way of silencing left-leaning speech,” she said.

In some cases, there have been violent threats against a professor or a campus, and she said faculty members at some campuses have lost their jobs because of online protests.

Ari Cohn, of the Foundation for Individual Rights in Education, saw in the story a now-familiar pattern. “This is just a continuation of the past year’s worth of targeting faculty members for outrage mobs because they said something that offended people,” he said.

Cohn said he is not surprised that people were offended by comments so soon after Bush’s death. But he said it is indisputable that Jarrar, a government employee, was speaking as a private citizen about a matter of public concern by commenting on policies during the Bush administrations. “The only way Fresno State could punish that statement is if it makes a pretty strong showing that its interests are being harmed,” Cohn said.

Universities should be tolerant of controversial speech because of the nature of the work scholars do, said Keith Whittington, a professor of politics at Princeton University and author of “Speak Freely: Why Our Universities Must Defend Free Speech.” Entire academic fields are inflammatory to some people, and research can provoke, he said.

“Leaders of universities need to be emphatic that there are lots of people on university campuses that say controversial things, and [there is] lots of disagreement,” he said. “That’s something we ought to value.”

Read more:

A California waiter refused to serve 4 Latina customers until he saw ‘proof of residency’

He trained a pug to do a Nazi salute for a YouTube video. Now, he’s been fined for a hate crime.

Authorities: Gold miners at a bar bragged about slaughtering members of a reclusive Brazilian tribe