Walt Disney on Friday fired James Gunn from the Guardians of the Galaxy franchise after years-old offensive tweets by the filmmaker resurfaced on social media. The posts included jokes about paedophilia and rape, according to reports.

Gunn had written and directed the first two films of the series, which features an ensemble cast including Chris Pratt, and was leading the upcoming third instalment as well. The films are a part of the Marvel Cinematic Universe and are distributed by Disney.

“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,” Walt Disney Studios chairman Alan Horn said in a statement on Friday.

According to The Hollywood Reporter, the tweets were dug up by conservative website The Daily Caller and dated back to 2008-09. The website trawled through Gunn’s Twitter account after the fimmaker posted some tweets critical of US President Donald Trump and Right Wing political commentator Ben Shapiro. Gunn’s old posts were then shared by other conservatives on Twitter.

In a statement, Gunn said, “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 added that he takes full responsibility for the tweets. “Regardless of how much time has passed, I understand and accept the business decisions taken today,” he said. “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.”

After Disney announced its decision, actors Dave Bautista and David Dastmalchian spoke out in Gunn’s defence. Bautista, who plays the inter-galactic crime fighter Drax in the Guardians series, said he is “not ok” with the studio’s decision.