Writer-director, 51, had been removed from the Marvel film after offensive tweets were discovered last year

James Gunn has been reinstated as writer-director of Guardians of the Galaxy 3 after being fired by Disney last year.

The 51-year-old film-maker, who had been behind both previous instalments of the Marvel franchise, came under fire when old tweets resurfaced that made light of 9/11, rape and paedophilia. The Walt Disney Studios chairman, Alan Horn, called Gunn’s behaviour “indefensible” and severed ties with him.

White hero, sidekick of color: why Marvel needs to break the cycle Read more

According to Deadline, the decision to rehire him was made months ago after conversations between Disney and Marvel. Horn was reportedly persuaded by Gunn’s public apology and a series of meetings.

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

Stars from the first two films shared their support for Gunn after his removal, including Bradley Cooper, Zoe Saldana, Chris Pratt and Dave Bautista, who claimed he wouldn’t return unless Gunn was reinstated. “To be honest with you, I don’t know if I want to work for Disney,” he said to Jonathan Ross at the time.

After he was removed from the third Guardians film, Gunn had signed on to make a sequel to Suicide Squad for Marvel’s rival DC. An agreement has been made that production will begin after Gunn has completed his work on the DC sequel. Gunn’s original script, written before his dismissal, will be used. The Guardians franchise has made over $1.6bn worldwide to date.

Gunn has been outspoken in his criticism of Donald Trump, tweeting that the US is in “a national crisis with an incompetent president”. The conservative site the Daily Caller dug up tweets from 2008 and 2009 that showcased a series of offensive jokes. Gunn hasn’t tweeted since his apology last summer.