James Gunn rehired to direct 'Guardians of the Galaxy 3' Months after being fired over old tweets, James Gunn has been rehired as director of 'Guardians of the Galaxy Vol. 3'

NEW YORK -- Months after being fired over old tweets, James Gunn has been rehired as director of "Guardians of the Galaxy Vol. 3."

Representatives for the Walt Disney Co. and for Gunn on Friday confirmed that Gunn has been reinstated as writer-director of the Marvel franchise he has guided from the start. Gunn was fired last July over tweets from nearly a decade ago in which Gunn joked about subjects like pedophilia and rape.

Gunn earlier apologized for the tweets, which he called "unfortunate efforts to be provocative." Disney Chairman Alan Horn at the time said Gunn's words were inconsistent with the studio's values. The comments, made from 2008 to 2011, were brought to light by far-right propagandists Mike Cernovich and Jack Posobiec who combed through Gunn's social media history after Gunn's criticism of President Donald Trump.

But Gunn's dismissal was passionately protested by many. Fan petitions circulated online. The "Guardians" cast, including Chris Pratt, Bradley Cooper, Zoe Saldana, Vin Diesel and other stars, supported Gunn in an open letter. "Although I don't support James Gunn's inappropriate jokes from years ago, he is a good man," Pratt said.

"I am tremendously grateful to every person out there who has supported me over the last few months," Gunn said in a statement. "I am always learning and will continue to work at being the best human being I can be."

Gunn added a thank you to Disney and said he was excited to "continue making films that investigate the ties of love that bind us all."

Gunn has since signed on to write and direct the next installment of Warner Bros.' "Suicide Squad" for the Marvel rival DC Comics. That film is to shoot in the fall and be released in August 2021.

A Disney spokesman declined to comment on when "Guardians 3" might go into production. The first two films have made more than $1.5 billion in worldwide ticket sales.

Deadline first reported Gunn's rehiring.