(Bloomberg) -- Walt Disney Co. rehired “Guardians of the Galaxy” director James Gunn to oversee the latest movie in the series, a surprise plot twist that comes eight months after he was fired for offensive tweets.

Gunn is slated to serve as writer-director for “Guardians of the Galaxy 3,” according to his publicist. Deadline Hollywood previously reported on the move. Disney didn’t respond to a request for comment.

Disney terminated Gunn on July 20 after the right-leaning website Daily Caller and other conservative commentators published years-old tweets by the director that included jokes about the Holocaust, pedophilia, overweight people and violence against women. Gunn apologized for what he described as a hurtful sense of humor.

“My days saying something just because it’s shocking and trying to get a reaction are over,” he said at the time.

A backlash followed his firing, with “Guardians of the Galaxy” fans urging Disney to reinstate the filmmaker. Actors such as Zoe Saldana, Chris Pratt and Selma Blair also tweeted in support of Gunn, who wrote and directed both previous “Guardians” movies.

Gunn’s two “Guardians” films, which have grossed more than $1.6 billion, have a loyal base of Marvel superhero fans. He also was an outspoken critic of Donald Trump, while the Daily Caller is supportive of the president.

To contact the reporters on this story: Christopher Palmeri in Los Angeles at cpalmeri1@bloomberg.net;Anousha Sakoui in Los Angeles at asakoui@bloomberg.net

To contact the editor responsible for this story: Nick Turner at nturner7@bloomberg.net

©2019 Bloomberg L.P.