Disney fired writer-director James Gunn from the “Guardians of the Galaxy” franchise on Friday after old tweets surfaced showing him joking about rape and pedophilia.

“My words of nearly a decade ago were, at the time, totally failed and unfortunate efforts to be provocative,” Gunn said in a statement. “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,” he continued. “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.”

Also Read: James Gunn Won't Appear During Sony's Hall H Presentation at San Diego Comic-Con

Online sleuths began digging up tweets that Gunn admitted were “offensive,” many from between 2008 and 2011, after right-wing provocateur Mike Cernovich posted a series of old tweets by Gunn, in which he made offensive jokes about taboo topics like rape and pedophilia. Many of the tweets have since been deleted.

Gunn previously apologized in a series of tweets late Thursday and tried to explain and defend himself.

On Friday, Disney dropped Gunn from the “Guardians of the Galaxy” franchise.

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

Also Read: James Gunn Says He's Finished Writing 'Guardians of the Galaxy Vol. 3'

Gunn’s firing leaves a big question for Disney’s multi-billion dollar Marvel Cinematic Universe. Last month Gunn tweeted that he’d finished the script for “Guardians of the Galaxy Vol. 3.” The studio will now need to find someone to replace him as director.

The film was expected to be released in 2020.

“Guardians of the Galaxy,” which Gunn wrote and directed, earned $773.3 million at the worldwide box office back in 2014, and the sequel, “Guardians of the Galaxy Vol. 2,” which he also wrote and directed, pulled in $863.8 last year.