Roseanne Barr has hit out at accusations she is racist as she claimed to be examining her options.

The TV star saw her show, Roseanne, cancelled on Tuesday and networks airing reruns pulled them from the schedule after she compared a former White House aide to an ape on Twitter.

She has apologised for the offensive tweet about Valerie Jarrett and said she had taken sleeping pills prior to sending the message.

Barr returned to Twitter on Wednesday to reject accusations she is racist and is considering fighting back.

She wrote: “I’m not a racist, I never was & I never will be.

“One stupid joke in a lifetime of fighting 4 civil rights 4 all minorities, against networks, studios, at the expense of my nervous system/family/wealth will NEVER b taken from me.”

In a second post she tweeted: “You guys make me feel like fighting back. I will examine all of my options carefully and get back to U.”

Earlier on Wednesday, President Donald Trump had waded into the row while the pharmaceutical company which makes Barr’s brand of sleeping pill said “racism is not a known side effect”.

Mr Trump had hit out at Bob Iger, chief executive of Disney, who own ABC.

He wrote on Twitter: “Bob Iger of ABC called Valerie Jarrett to let her know that ‘ABC does not tolerate comments like those’ made by Roseanne Barr.”

Barr served as a star and executive producer on the ABC show, which was a ratings phenomenon when it returned to US television earlier this year for a 10th series, after its original run came to an end in May 1997.

The 65-year-old actress and her co-star John Goodman reportedly earned about 250,000 dollars (£190,000) per episode, according to Variety.

She earned about 21 million dollars (£16 million) for acting, directing and producing the nine episodes of the new series, Slate reported.

The return was watched by an estimated 18.4 million viewers in the US and Mr Trump phoned Barr to congratulate her on the success.

Barr has apologised to her colleagues who lost their jobs after she sent a now-deleted tweet referring to former Barack Obama adviser Ms Jarrett as a product of the Muslim Brotherhood and the Planet Of The Apes.

Responding to a fan on Twitter, she said she believed the show was axed because of a threatened boycott of the show’s advertisers.

She also addressed fans, writing: “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.”

She added: “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 added: “Please don’t start all of that boycott abc stuff-I’m not a censor and they have the right to do what they wish. It’ all ok. thanks tho guys!

“I’m sorry 4 my tweet, AND I will also defend myself as well as talk to my followers. so, go away if u don’t like it. I will handle my sadness the way I want to. I’m tired of being attacked & belittled more than other comedians who have said worse.

“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.”

Barr has previously apologised to Ms Jarrett, writing: “I want to apologize to you. I am very sorry to have hurt you. I hope you can accept this sincere apology!”

Apologising to colleagues on Roseanne who lost their jobs following the show’s cancellation, she wrote: “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.”

Barr also revealed she would be appearing on US comedian Joe Rogan’s podcast on Friday.

Ms Jarrett is yet to respond to Barr’s apology on Twitter, only tweeting a response to actress Julia Louis-Dreyfus, who had shared a selfie of the two of them.

Earlier, speaking on MSNBC, she said: “I’m fine. I’m worried about the people out there who don’t have a circle of friends and followers who come right to their defence.”