American actor Roseanne has apologised for "making a bad joke" after she incited outrage by comparing a black former Obama administration official to an ape in remarks on Twitter.
She has also asked her fans not to defend her as she had done something that was "indefensible".
Walt Disney Co's ABC network on Tuesday swiftly cancelled the popular US television comedy Roseanne and Network Ten in Australia followed suit.
In a since deleted comment on Twitter, Barr compared Valerie Jarrett, a former adviser to President Barack Obama, to an ape. Barr wrote that if the Islamist political movement "muslim brotherhood & planet of the apes had a baby = vj."
The 65-year-old actor apologised "for making a bad joke" about Jarrett's "politics and her looks" and wrote she was sorry to have hurt her.
Later on Tuesday Barr tweeted: "Don't feel sorry for me, guys!!,"
"I just want to apologise 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."
In a later tweet Barr told fans not to defend her as she had done something unforgivable.
"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."
She also urged fans not to boycott ABC: "I'm not a censor and they have the right to do what they wish."
Barr's show, a revival of the 1990s hit Roseanne, was the ABC's most widely watched prime time show for the TV season that ended last week.
"Roseanne's Twitter statement is abhorrent, repugnant and inconsistent with our values, and we have decided to cancel her show," ABC Entertainment President Channing Dungey said in a statement.
In Australia Network Ten also pulled Roseanne off the air.
"Network Ten is appalled and disgusted with Ms Barr's racist tweet and has removed Roseanne from TEN and ELEVEN, effective immediately," a spokesperson said in a statement.
Jarrett, 61, said Disney Chief Executive Bob Iger called her before ABC announced the show's cancellation.
"I think we have to turn it into a teaching moment," Jarrett said.
"I'm fine. I'm worried about all the people out there who don't have a circle of friends and followers coming to their defence."
US President Donald Trump has cited the Roseanne show's huge viewership as evidence his supporters, who include Barr, want shows that speak to their concerns.
White House spokeswoman Sarah Sanders, asked whether Trump thought the show should have been cancelled, told reporters: "That's not what the president is looking at. That's not what he's spending his time on. I think we have a lot bigger things going on in the country right now."
The original Roseanne ran from 1988 to 1997, featuring a blue-collar family, the Conners, with overweight parents struggling to get by. It was praised for its realistic portrayal of working-class life.