"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," said Walt Disney Studios chairman Alan Horn.

Gunn deleted his Twitter account shortly before news of the firing became public. Before deleting his account The Hollywood Reporter wrote Gunn tweeted, "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."

Gunn apologized for the old tweets Friday after his firing, echoing similar sentiments he expressed on Twitter a day earlier, the Associated Press reported.

"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," Gunn said in a statement. "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."

Gunn had been in line to direct the third installment of the franchise scheduled for 2020. A replacement has not yet been named.