Actor Hartley Sawyer has been fired from US superhero TV show The Flash after offensive tweets resurfaced.
Sawyer, who played Ralph Dibny/the Elongated Man, apologised after posts containing sexist and racist references emerged.
Sawyer said the tweets were "hurtful and unacceptable" and that "I regret them deeply".
The Flash producers announced he would not feature in the seventh series of The CW channel's show.
Sawyer, who joined the drama in 2017, has now deleted his Twitter account, but screenshots of the offending tweets have circulated online.
Warner Bros Television, The CW channel, Berlanti Productions and showrunner Eric Wallace issued a joint statement confirming Sawyer would not return for season seven.
"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," they said.
"Such remarks are antithetical to our values and policies, which strive and evolve to promote a safe, inclusive and productive environment for our workforce."
The tweets also contained homophobic language and some discussed violence against women.
'Really horrible attempts to get attention'
In an apology on Instagram, Sawyer said he was "ashamed" even though his comments had been made in jest.
"My words, irrelevant of being meant with an intent of humour, 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," he said.
"This was not acceptable behaviour. 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."
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.
Wallace tweeted a separate personal statement saying Sawyer's tweets "broke my heart and made me mad as hell. And they're indicative of the larger problem in our country".
My statement regarding Hartley Sawyer and THE FLASH. pic.twitter.com/hni0MxOWZU— Eric Wallace (@ewrote) June 8, 2020
Lead actor Grant Gustin reposted Wallace's statement and added: "I will say I was shocked, saddened and angry when I saw the tweets. Words matter."
The Flash has been nominated for a string of Teen Choice Awards, People's Choice Awards and Kids' Choice Awards over the years.