“Guardians of the Galaxy” director James Gunn is in talks to write “Suicide Squad 2,” jumping ship from Marvel to DC.

Gunn’s deal was made “with an eye to direct” the Warner Bros. film, which is expected to be a completely new take.

Gunn helmed the first two “Guardians of the Galaxy” movies, but was fired from the franchise this summer following the re-emergence of old, offensive tweets joking about pedophilia and rape.

The studio had been developing “Suicide Squad 2” with “The Accountant” director Gavin O’Connor, who came on board a year ago, but is no longer attached.

Sony announced on Monday that it moved Gunn’s “BrightBurn” back from Nov. 30 to May 24, 2019 — the start of Memorial Day weekend. Gunn produced the project with The H Collective. “BrightBurn” stars Elizabeth Banks, Jackson Dunn, David Denman, Meredith Hagner, and Matt Jones.

The first “Suicide Squad” was toplined by Will Smith, Margot Robbie, Jared Leto, Joel Kinnaman, Viola Davis, Jai Courtney, Jay Hernandez, Adewale Akinnuoye-Agbaje, Ike Barinholtz, Scott Eastwood, and Cara Delevingne. Despite poor reviews, the movie earned nearly $750 million worldwide on a $175 million budget. The film, written and directed by David Ayer, followed imprisoned supervillains executing black ops missions to save the world in exchange for reduced sentences.

Gunn has apologized for the tweets, which were posted between 2008 and 2012. The “Guardians of the Galaxy” cast issued a collective statement of support for Gunn, but Disney executives stood firm on the dismissal.

One of Gunn’s staunchest supporters, Dave Bautista, who played Drax the Destroyer in the “Guardians” movies, tweeted on Tuesday that he wanted to join “Suicide Squad 2” to work with Gunn again.

The two “Guardians” films, released in 2014 and 2017, were strong performers for Disney and Marvel, hauling a combined $1.6 billion at the worldwide box office. In addition to directing, Gunn teamed with Nicole Perlman on the script for the first, which was nominated for a Writers Guild Award, and was the only credited writer on the second. Both movies raised Gunn’s stock as they underlined his ability to make popcorn movies with multiple characters.

The hiring by Warner Bros. shows that Gunn remains a significant player in the superhero world, despite the Disney firing, and that Warner Bros. is willing to gamble in its efforts to challenge Disney-Marvel’s record of unbroken success in that superhero realm.

News about Gunn was first reported by The Wrap.

RELATED VIDEO: