Stellar ratings and an apology weren't enough to mitigate Roseanne Barr's racist comments, and now ABC is pulling the plug on "Roseanne." ABC Entertainment president Channing Dungey confirmed the network has decided to cancel the "Roseanne" reboot following Barr's tweet comparing former Obama White House aide Valerie Jarrett to an ape.

Dungey said in a statement, "Roseanne's Twitter statement is abhorrent, repugnant and inconsistent with our values, and we have decided to cancel her show." In 2016, Dungey made headlines when she became the first African-American to run the entertainment division of a major broadcast television network.

Bob Iger, chairman and CEO of The Walt Disney Company, which owns ABC, shared Dungey's statement on Twitter and added the comment, "There was only one thing to do here, and that was the right thing."

From Channing Dungey, President of ABC Entertainment: "Roseanne's Twitter statement is abhorrent, repugnant and inconsistent with our values, and we have decided to cancel her show."

There was only one thing to do here, and that was the right thing. — Robert Iger (@RobertIger) May 29, 2018

Although Barr had earlier tweeted that she was leaving Twitter, she returned Tuesday night. She retweeted some support she had received -- as well wrote she thought Jarrett was "Saudi" -- and then she issued a statement.

Don't feel sorry for me, guys!!-I just want to apologize to the hundreds of people,and wonderful writers (all liberal) and talented actors who lost their jobs on my show due to my stupid tweet. I will be on Joe Rogan's podcast friday. — Roseanne Barr (@therealroseanne) May 30, 2018

Roseanne also tweeted at Jarrett that she was "very sorry to have hurt you. I hope you can accept this sincere apology!"

@ValerieJarrett I want to apologize to you. I am very sorry to have hurt you. I hope you can accept this sincere apology! — Roseanne Barr (@therealroseanne) May 30, 2018

Barr continued to tweet into the night, retweeting a statement she said she sent BuzzFeed News West Coast correspondent Kate Aurthur.

Barr also tweeted "hey guys, don't defend me" and that she "went 2 far." She claimed she was "ambien tweeting" when she posted about Jarrett.

hey guys, don't defend me, it's sweet of you 2 try, but...losing my show is 0 compared 2 being labelled a racist over one tweet-that I regret even more. — Roseanne Barr (@therealroseanne) May 30, 2018

guys I did something unforgiveable so do not defend me. It was 2 in the morning and I was ambien tweeting-it was memorial day too-i went 2 far & do not want it defended-it was egregious Indefensible. I made a mistake I wish I hadn't but...don't defend it please. ty — Roseanne Barr (@therealroseanne) May 30, 2018

But she also retweeted tweets from her supporters that seemed to contradict the earlier statements, including comments that "leftist" celebrities wouldn't have gotten the same treatment.

Get Breaking News Delivered to Your Inbox

ICM Partners, the talent agency that represents Barr, also dropped her as a client. The company sent an email to all of its employees saying, "We are all greatly distressed by the disgraceful and unacceptable tweet from Roseanne Barr this morning. What she wrote is antithetical to our core values, both as individuals and as an agency. Consequently, we have notified her that we will not represent her. Effective immediately, Roseanne Barr is no longer a client."

Reruns of the show also took an immediate hit, with Viacom announcing that it would drop the series from all its channels.

Earlier on Tuesday, Barr apologized for the racist tweet about Valerie Jarrett, a former senior advisor to President Barack Obama, in which Barr compared Jarrett, who is black, to an ape.

Barr's tweet about Jarrett said, "muslim brotherhood & planet of the apes had a baby=vj."

After initially pushing back against criticism of the comment, Barr admitted her "joke" was in "bad taste." She said she was sorry and that she was leaving Twitter.

"I apologize to Valerie Jarrett and to all Americans. I am truly sorry for making a bad joke about her politics and her looks. I should have known better. Forgive me-my joke was in bad taste." But the apology was clearly not enough for ABC.

I apologize. I am now leaving Twitter. — Roseanne Barr (@therealroseanne) May 29, 2018

I apologize to Valerie Jarrett and to all Americans. I am truly sorry for making a bad joke about her politics and her looks. I should have known better. Forgive me-my joke was in bad taste. — Roseanne Barr (@therealroseanne) May 29, 2018

Earlier, Barr had rebuffed accusations of racism by insisting that "Islam is not a race." But her eventual admission that the joke was about Jarrett's "looks" seemed to confirm that the ape comment was indeed about Jarrett's appearance.

Jarrett, in her first comments about the incident, said, "We have to turn it into a teaching moment." She spoke at an MSNBC town hall event, "Everyday Racism in America."

"I'm fine," Jarrett said, adding, "I'm worried about all the people out there who don't have a circle of friends and followers who come right to their defense. The person who's walking down the street minding their own business and they see somebody cling to their purse, or want to cross the street, or every black parent I know who has a boy who has to sit down and have a conversation, 'the talk' as we call it, and as you say, those ordinary examples of racism that happen every single day."

The offending tweet came late Monday night, amid a series of tweets referring to George Soros as a Nazi and Chelsea Clinton as a Soros family member (Barr apologized and took it back, then attacked the family of Clinton's husband, Marc Mezvinsky, instead).

Barr is a vocal President Trump supporter, as is her character on the "Roseanne" revival on ABC. Mr. Trump called Barr to congratulate her after the first episode of the reboot scored record ratings.

Before the show was canceled, comedian Wanda Sykes, a consulting producer on the show, tweeted that she would not be returning in the wake of Barr's comments.