Hartley Sawyer has apologised for his comments but says they were meant to be humorous (Getty Images)

Resurfaced old tweets allegedly posted by actor Hartley Sawyer, prior to joining The CW series “The Flash”, have resulted in him being fired.

“Hartley Sawyer will not be returning for season seven of The Flash,” said a statement from The CW, producers Warner Bros. TV and Berlanti Productions and executive producer Eric Wallace released on Monday read.

“In regards to Mr Sawyer’s posts on social media, we do not tolerate derogatory remarks that target any race, ethnicity, national origin, gender, or sexual orientation. Such remarks are antithetical to our values and policies, which strive and evolve to promote a safe, inclusive and productive environment for our workforce.”

Sawyer, 35, has not commented about his termination. Warner Bros. TV is owned by CNN’s parent company.

Last week actress Skai Jackson tweeted screen grabs of several of the Sawyer’s purported tweets, writing “Hartley Sawyer, you have been exposed…”

One shows a tweet from 2012 which read, “The only thing keeping me from doing mildly racist tweets is the knowledge that Al Sharpton would never stop complaining about me” and another from 2014 which read, “Enjoyed a secret boob viewing at an audition today.”

Two other tweets from 2012 read, “As a lad, one of my favourite activities was kidnapping homeless women and cutting off their breasts” and “Date rape myself so I don’t have to masturbate.”

CNN has been in contact with the person who appears to have originally shared the offensive tweets.

That person, who asked not to be identified, said they gathered the old tweets and posted them after Sawyer made a comment about Black Lives Matter.

Screen grabs of the tweets have circulated over the last two weeks. Sawyer’s Twitter account has since been deleted.

Without mentioning specific tweets, the actor — who played Ralph Dibny on the series for three seasons — apologized in a lengthy statement posted on his verified Instagram account on May 30 — hours after the screen grabs originally started circulating.

View this post on Instagram

My words, irrelevant of being meant with an intent of humor, were hurtful, and unacceptable. I am ashamed I was capable of these really horrible attempts to get attention at that time. I regret them deeply. This was not acceptable behavior. These were words I threw out at the time with no thought or recognition of the harm my words could do, and now have done today. I am incredibly sorry, ashamed and disappointed in myself for my ignorance back then. I want to be very clear: this is not reflective of what I think or who I am now. Years ago, thanks to friends and experiences who helped me to open my eyes, I began my journey into becoming a more responsible adult – in terms of what I say, what I do, and beyond. I've largely kept that journey private, and this is another way that I have let so many down. I still have more work to do. But how I define myself now does not take away the impact of my words, or my responsibility for them. I am very sorry.

A post shared by Hartley Sawyer (@hartleysawyer) on

“I’m not here to make excuses – regardless of the intention, my words matter and they carry profound consequences,” the statement read. “And mine can and have caused pain and embarrassment along with feelings I can only imagine, to supporters and fans, my cast mates, the crew, my colleagues and friends.”

“I owe them all an apology. And I owe each of you an apology,” he added. “Thank you for holding me accountable.”

His Twitter account has been deleted.

Eric Wallace, the executive producer of “The Flash,” posted a statement Monday saying the tweets “broke my heart and made me mad as hell.”

“I, too am committed to bringing permanent change to the work environment here on The Flash,” Wallace wrote. “Yes, this is a family show. But it’s for all families. That includes Black and Brown ones.”

NULL Invalid API key or channelobject(stdClass)#8136 (1) { ["error"]=> object(stdClass)#8219 (3) { ["code"]=> int(403) ["message"]=> string(117) "The request cannot be completed because you have exceeded your quota." ["errors"]=> array(1) { [0]=> object(stdClass)#8211 (3) { ["message"]=> string(117) "The request cannot be completed because you have exceeded your quota." ["domain"]=> string(13) "youtube.quota" ["reason"]=> string(13) "quotaExceeded" } } } }