James Gunn has been fired as director of Guardians of the Galaxy Vol. 3 by Disney.
Gunn had previously written and directed the first two instalments of the hugely popular Marvel series.
The studio made the decision after a series of offensive tweets from Gunn were unearthed. Most of the tweets dated from 2008 to 2011 and saw him make light of controversial topics.
In a statement, a spokesperson for Disney said: "The offensive attitudes and statements discovered on James' Twitter feed are indefensible and inconsistent with our studio's values, and we have severed our business relationship with him."
Gunn addressed his sacking in a statement, saying: "My words of nearly a decade ago were, at the time, totally failed and unfortunate efforts to be provocative. I have regretted them for many years since - not just because they were stupid, not at all funny, wildly insensitive, and certainly not provocative like I had hoped, but also because they don’t reflect the person I am today or have been for some time.
"Regardless of how much time has passed, I understand and accept the business decisions taken today. Even these many years later, I take full responsibility for the way I conducted myself then. All I can do now, beyond offering my sincere and heartfelt regret, is to be the best human being I can be: accepting, understanding, committed to equality, and far more thoughtful about my public statements and my obligations to our public discourse. To everyone inside my industry and beyond, I again offer my deepest apologies. Love to all."
The filmmaker had previously sent a series of tweets in response to the controversy.
1. Many people who have followed my career know when I started, I viewed myself as a provocateur, making movies and telling jokes that were outrageous and taboo. As I have discussed publicly many times, as I’ve developed as a person, so has my work and my humor.— James Gunn (@JamesGunn) July 20, 2018
"Many people who have followed my career know when I started, I viewed myself as a provocateur, making movies and telling jokes that were outrageous and taboo. As I have discussed publicly many times, as I’ve developed as a person, so has my work and my humor", he wrote.
"It’s not to say I’m better, but I am very, very different than I was a few years ago; today I try to root my work in love and connection and less in anger. My days saying something just because it’s shocking and trying to get a reaction are over.
"In the past, I have apologized for humor of mine that hurt people. I truly felt sorry and meant every word of my apologies.
The director concluded: "Anyway, that’s the completely honest truth: I used to make a lot of offensive jokes. I don’t anymore. I don’t blame my past self for this, but I like myself more and feel like a more full human being and creator today. Love you to you all."
Disney has not yet announced a replacement for Gunn.
Guardians of the Galaxy Vol. 3 is scheduled to hit cinemas in 2020.