The pharmaceutical company that makes Ambien has said “racism is not a known side effect” in response to Roseanne Barr blaming the drug for an offensive tweet.

The American comedian claimed that she was “ambien tweeting” when she said Valerie Jarrett, who is black, is the product of the Muslim Brotherhood and Planet Of The Apes.

US network ABC swiftly cancelled her show – which had been a huge hit when it was revived earlier this year.

Many of her co-stars also condemned her comments about the former White House aide.

After initially posting that she would be quitting Twitter, Barr went on to post a flurry of messages on the site.

Barr wrote: “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.”

She later said: “”I think Joe Rogan is right about ambien. Not giving excuses for what I did(tweeted) but I’ve done weird stuff while on ambien-cracked eggs on the wall at 2am etc.”

The tweets about “ambien tweeting” have since been removed and the comedian has gone on to say “I blamed myself. not ambien, stop lying [sic].”

Barr also tweeted: “no, i didnt i blamed myself. stop lying. Yes, I have had odd ambien experiences on tweeting late at night-like many other ppl do. I BLAME MYSELF OK? it’s just an explanation not an excuse, Ok, bully?”.

More from Entertainment

Sanofi makes Ambien. The French company’s US Twitter account posted a message in response, saying: “People of all races, religions and nationalities work at Sanofi every day to improve the lives of people around the world.

“While all pharmaceutical treatments have side effects, racism is not a known side effect of any Sanofi medication.”