Actress and comedian Roseanne Barr has generated plenty of controversy for her political stances over the years but a tweet on Monday proved too much for Hollywood executives. Despite strong ratings, ABC canceled the recently rebooted “Roseanne” sitcom after its star compared former White House senior adviser Valerie Jarrett to the Muslim Brotherhood and "Planet of the Apes."

Barr responded to a Twitter thread that claimed former President Barack Obama had spied on French presidential candidates. One of the users in the thread name-dropped former Obama adviser Valerie Jarrett, saying she helped Obama “hide a lot,” according to NBC News.

Barr responded by saying Jarrett, who was born in Iran to African-American parents, was what would happen if the “Muslim brotherhood & planet of the apes had a baby.”

Twitter users called out Barr for racism in the replies to the tweet, which was deleted by Tuesday afternoon.

"I apologize to Valerie Jarrett and to all Americans. I am truly sorry for making a bad joke about her politics and her looks," Barr said. "I should have known better. Forgive me — my joke was in bad taste."

Jarrett, 61, is a Stanford graduate and received her law degree from the University of Michigan. Before joining the Obama administration she had served as the CEO of Habitat Company, a real estate development and management firm.

“Roseanne’s Twitter statement is abhorrent, repugnant and inconsistent with our values, and we have decided to cancel her show,” ABC said in a statement, per Variety.

Comedian and actress Wanda Sykes, who was credited as a consulting producer on the sitcom, announced she was leaving the show after the Barr's Twitter comments. ABC confirmed the show’s cancelation not long after Sykes’ exit.

Co-star Sara Gilbert described Barr's postings as “abhorrent and do not reflect the beliefs of our cast and crew or anyone associated with our show.” She also added: “I am disappointed in her actions to say the least.”

Barr’s tweet was just the latest online controversy involving the longtime sitcom star. Over the years, her tweets have contained everything from transphobic comments to interest in right-wing conspiracy theories.

One contentious detail about the new “Roseanne” reboot was the protagonist’s support for President Donald Trump. Critics charged that it was inconsistent with the character from the show’s original nine-season run. Former writers from the original version of the show even questioned the character’s turn to the right.

Despite the criticism, the new season of “Roseanne” received strong ratings. At the end of March, the network had renewed it for a second season

GettyImages-938844562 ABC canceled its 'Roseanne' reboot after just one season. Actress Roseanne Barr speaks during SiriusXM's Town Hall with the cast of 'Roseanne' on March 27, 2018 in New York City. Photo: Astrid Stawiarz/Getty Images for SiriusXM