James Gunn has been fired as director of the Guardians of the Galaxy franchise after a series of offensive tweets have resurfaced.

The 51-year-old film-maker had been behind the first two Marvel hits and was working on the script for the third. Tweets of his from 2008 and 2009 were discovered by the conservative site the Daily Caller that made light of rape, pedophilia, 9/11 and the Holocaust. Gunn has been vocal in his criticism of Donald Trump, tweeting last year that the US is in “a national crisis with an incompetent president”.

In one of the resurfaced tweets, Gunn wrote: “The best thing about being raped is when you’re done being raped and it’s like ‘whew this feels great, not being raped!’”

Alan Horn, the Walt Disney studios chairman, said in a statement: “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.”

As the story brewed, Gunn initially tweeted an apology for “outrageous and taboo” jokes. He later released a longer statement, taking “full responsibility” for his actions.

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

In 2011, Gunn had apologized in a statement to Glaad for a number of blogposts that contained crude jokes about gay comic-book characters.

Gunn’s credits also include the 2006 horror Slither and he was set to reboot a new series of Starsky & Hutch. The Guardians franchise has made over $1.6bn worldwide to date and the third was expected to be released in 2020.