Media playback is unsupported on your device Media caption President Trump once told supporters Roseanne 'was about us'

Roseanne Barr has blamed sleeping pills for her tweet likening an African-American former Obama aide to an ape.

The comedian blamed the offensive post on "ambien tweeting" - although she has since removed the tweet. Ambien is a sedative pill used as a sleeping aid.

ABC cancelled Roseanne's sitcom over the racist tweet. They also apologised to the aide, Valerie Jarrett.

US President Donald Trump on Wednesday broke his silence on Barr, who has been one of his most outspoken supporters.

"Bob Iger of ABC called Valerie Jarrett to let her know that 'ABC does not tolerate comments like those' made by Roseanne Barr", Mr Trump tweeted on Wednesday, referring to the former White House senior adviser.

"Gee, he never called President Donald J. Trump to apologize for the HORRIBLE statements made and said about me on ABC.

Barr's tweet described Mrs Jarrett as the child of the Muslim Brotherhood, an Islamist group, and the Planet of the Apes film.

The television network said on Tuesday: "Roseanne's Twitter statement is abhorrent, repugnant and inconsistent with our values and we have decided to cancel her show."

The reboot of her hit sitcom Roseanne had been a ratings winner, and Mr Trump had called to congratulate her personally on its first season back.

Barr deleted Monday night's post and said she was leaving Twitter, but has since posted a flurry of tweets including one claiming other comedians "have said worse".

In another tweet, the TV star tried to explain away the post as having been caused by the effects of Ambien.

A spokeswoman for Sanofi, the pharmaceutical company that makes Ambien, said in response to Barr's tweets about taking the sedative: "While all pharmaceutical treatments have side effects, racism is not a known side effect of any Sanofi medication."

Image copyright Getty Images Image caption Valerie Jarrett, centre, was one of President Barack Obama's longest-serving aides

On Wednesday, Barr also told former fellow cast member Michael Fishman, who played DJ Conner on the show: "You throw me under the bus. nice!"

She hit back at him after he posted a statement branding her original post "reprehensible".

Barr's racist tweet came in response to another Twitter user, who accused Mrs Jarrett of helping to conceal purported spying during the Obama administration.

Mrs Jarrett was a senior adviser to US President Barack Obama, and worked with him during his early days in Chicago politics.

Barr apologised, saying the remark was a "bad joke", but the backlash mushroomed.

Will Trump condemn his favourite TV star?

Anthony Zurcher, BBC News, Washington

On Tuesday White House press secretary Sarah Huckabee Sanders deflected questions about the president's views on the Roseanne Barr controversy by saying that he had been "extremely focused" on other things.

That seemed a bit hard to swallow. The president had taken pride in the viewership ratings of the rebooted Roseanne Show, claiming in a March rally that its success "was about us". He even called Barr - an outspoken supporter of the president - to offer his congratulations.

On Wednesday, Mr Trump broke his silence. What he tweeted was that he had been slighted by ABC because he never received an apology for unnamed disparagements. What he didn't express was any sort of condemnation of Barr's racist tweet.

Mr Trump has often been criticised for an apparent unwillingness to address episodes of racial discrimination or hostility. Following violence at a white nationalist rally in Charlottesville, Virginia, in which one counter-protester was killed, the president assigned blame to both sides. He noted that there were "good people" among those chanting racist and anti-Semitic slogans in a torchlight rally the night before the clashes.

With his tweet, Mr Trump will face renewed pressure to explicitly denounce Barr's comments. After embracing the comedian as a voice for his movement, however, the president may find such a step difficult to manage.

The 65-year-old entertainer wrote on Tuesday she was "leaving Twitter", but returned shortly after with a string of tweets addressing the cancellation of her sitcom.

"I will handle my sadness the way I want to," she said. "I'm tired of being attacked and belittled more than other comedians who have said worse."

Image copyright AFP Image caption The return of Roseanne was as short-lived as it was spectacular

Barr also said that not only had her new series been axed, but also that older reruns of the sitcom had been cancelled by other networks.

A spokesman for Viacom, which owns various networks including Paramount, earlier said it would stop airing old episodes. The streaming service Hulu also said it would be removing the sitcom from its library.

What's the reaction?

Speaking at a prescheduled MSNBC town hall event on racism, Mrs Jarrett said the Roseanne Barr controversy was "a teaching moment".

She added: "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."

She said that Robert Iger, chief executive of Disney, ABC's parent company, had called her to apologise and said he had "zero tolerance" for Barr's tweet.

Following ABC's cancellation notice, Barr's talent agency ICM Partners dropped her as a client.

Sara Gilbert, who plays daughter Darlene on the series, posted on Twitter that Barr's comments were "abhorrent".

Emma Kenney, who plays Darlene's daughter Harris, said "the racist and distasteful comments from Roseanne are inexcusable", adding: "Bullies do not win. Ever."

Danny Zuker, a writer for the original 1988 Roseanne show, said it was "nauseating" to see what Barr had become.

Her hit sitcom's premiere in March pulled in more than 25 million people, with delayed viewing counted in.

The comedy series won conservative plaudits because Barr plays a supporter of Mr Trump, a group largely ignored by Hollywood.