Roseanne Barr lost her popular television show on Tuesday, when ABC decided to cancel the sitcom “Roseanne” because the actress posted a racist, Islamophobic comment on Twitter, in which she suggested that Valerie Jarrett, a longtime adviser to former President Barack Obama, looked like an ape and was part of a secret Muslim plot.

In her subsequently deleted tweet, Barr had replied to a far-right conspiracy theorist’s claim that Jarrett had concealed illicit activity by Obama, like spying on Donald Trump. Jarrett, Barr wrote, was born after the “Muslim Brotherhood and Planet of the Apes had a baby.”

Among those who took a screenshot of the original tweet and alerted ABC was the critic Scott Tobias.

Although Barr later posted an apology of sorts, the network said in a statement that it had decided to cancel the show because the original comment was “abhorrent, repugnant and inconsistent with our values.”

ABC announced its decision about three hours after Barr’s apology seemed to confirm that her initial comment could only be interpreted as both racist and Islamophobic.

In addition to a racist trope about African-Americans, the comment Barr initially defended as “a joke” drew on a far-right conspiracy theory that Jarrett is a secret Muslim agent, spun from the fact that she was born in Iran.

As Jodi Kantor explained in the New York Times in 2008, Jarrett was born in 1956 to African-American parents who were not Muslim in the Iranian city of Shiraz, where her father, a physician, had taken a job after being offered a lower salary than his white peers in Chicago. Far from being an Islamic theocracy at the time, Iran was then ruled by Shah Mohammad Reza Pahlavi, a close ally of the United States who had been restored to power in a CIA-led coup in 1953.

Barr’s attempt to explain away her comment about Jarret as “a bad joke about her politics and her looks,” depends on the assumption that her audience would understand her references to both the racist belief that African-Americans look like apes and the baseless conspiracy theory, popular on the far-right, that Obama and his close adviser were secretly agents of a Muslim plot for global domination.

Although she deleted her racist tweet about Jarrett, the rest of Barr’s Twitter feed reveals a mind saturated in far-right conspiracy theories. In just the hour leading up to her apology on Tuesday, Barr’s tweets and retweets included: references to the viral “QAnon” conspiracy theory, which holds that a senior government official is using 4chan to post clues about pedophiles in the intelligence services plotting against Trump; a blog post claiming that Obama had directed the CIA to spy on Trump’s campaign; lies about the philanthropist George Soros having collaborated with the Nazis and claims that he was scheming to undermine democracy in cahoots with Chelsea Clinton; another attempt to smear Jarret by claiming that her mother was an anti-American communist; and an impassioned defense of Tommy Robinson, a far-right English nationalist who was jailed for contempt of court in Britain after using Facebook to harass and smear British Muslims.

As outrage spread across social networks over Barr’s clear racism against an African-American woman, several commentators noted that ABC had previously seemed willing to overlook her prior, frequent expressions of anti-Muslim bias.

Barr herself replied to one such comment, claiming that it was not racist to hate an entire class of people as long as they are defined solely by their religion and not their ethnicity.

While it is probably only a matter of time until the president weighs in, the Yahoo News editor Colin Campbell pointed out that Barr’s tweets spreading lies about Soros had already been retweeted by Donald Trump Jr.

After Barr gave a signal boost to lies about Soros’s childhood in Nazi-occupied Hungary, his spokesperson made it clear that the allegations so common in far-right circles are completely false.

In the aftermath of ABC’s decision to fire a star who made the company a huge amount of money by appealing to fellow Trump supporters, several commentators hailed the decision, while others, including some of my colleagues at The Intercept, suggested that the network should be asked why it ever gave a show to someone with her views.

Late Tuesday night, Barr returned to Twitter to undermine her own expression of contrition by: thanking racists and far-right conspiracy theorists for defending her, sharing a baseless conspiracy theory that her firing had been directed by Michelle Obama, arguing with members of the cast of her show who expressed revulsion at her comments, and claiming that her remark about Jarrett was not racist because she had mistakenly believed the Obama adviser was not African-American but either “Jewish and Persian,” “white,” or “Saudi.”

Barr also tweeted and then deleted a comment suggesting that she was under the influence of Ambien, claimed that ABC had decided to act after the African-American comedian Wanda Sykes announced that she would no longer work on her sitcom, and shared tweets claiming that it was no more racist to compare Jarrett to an ape than Trump to an orangutan, as Sykes did in 2016.

Barr also said the wave of criticism she faced for her racist remark made her feel sorry for Trump, “who goes thru this every single day.”

Update: May 30, 2018, 8:06 a.m. EDT
This column was revised to report Roseanne Barr’s response to critics after her firing by ABC in a series of tweets the actress posted on Twitter late Tuesday night.

Top photo: Laurie Metcalf, left, listened as Roseanne Barr participated in a panel discussion of the new series of “Roseanne” during the Disney/ABC Television Critics Association Winter Press Tour in January in Pasadena, Calif.