James Gunn has issued an apology after a series of old tweets, in which he joked about topics including pedophilia and rape, resurfaced — and resulted in Disney severing ties with the “Guardians of the Galaxy” filmmaker.

"My words of nearly a decade ago were, at the time, totally failed and unfortunate efforts to be provocative," Gunn, who deleted his Twitter account on Friday, said in a statement obtained by Variety.

"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."

He continued: "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 for 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 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

Gunn's past tweets were dug up on Thursday by critics who oppose his political beliefs. The filmmaker is an outspoken liberal who often criticizes President Trump.



One of the now-deleted tweets said, “I like when little boys touch me in my silly place.”

Another message read: “The best thing about being raped is when you’re done being raped and it’s like ‘whew this feels great, not being raped!'”

Other now-deleted tweets from 2008-2011 included jokes about the attacks of Sept. 11, 2001, AIDS and the holocaust.

“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 told Fox News in a statement.

He will no longer direct “Guardians of the Galaxy Vol. 3.”

Gunn responded to the backlash in a series of tweets in which he claimed he was a “provocateur” who made "jokes that were outrageous and taboo” and addressed the situation without issuing a new apology – claiming he has apologized in the past.

“As I’ve developed as a person, so has my work and my humor,” Gunn 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.”

Gunn said he meant it when he said he was sorry for the offensive tweets.

“I truly felt sorry and meant every word of my apologies,” Gunn wrote. “For the record, when I made these shocking jokes, I wasn’t living them out.”

Gunn concluded his thread by saying, “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.”

The Daily Caller, OAN correspondent Jack Posobiec and right-wing commentator Mike Cernovich are among those who unearthed the offensive rhetoric.

Gunn also deleted his personal website as his name became a trending topic on social media, according to TheWrap.

Gunn wrote and directed the Disney hits “Guardians of the Galaxy” and “Guardians of the Galaxy Vol. 2” in addition to several other projects. He is credited as an executive producer on “Avengers: Infinity War” and has written “Movie 43,” “Scooby-Doo,” “Dawn of the Dead” and “The Belko Experiment.”

Earlier this week, Gunn defended liberal actor Mark Duplass, who came under fire for encouraging his fans to follow conservative pundit Ben Shapiro to hear views from the other side of the aisle. Gunn mocked Shapiro in the process, which appears to be the impetus for conservatives digging into the filmmaker’s past.

Gunn’s representatives did not respond to requests for comment.