Image copyright Getty Images

James Gunn, the writer and director of the Guardians of the Galaxy films, is writing the new Suicide Squad film, Warner Bros has confirmed.

Sources told Newsbeat that he has "an eye to direct" the film too.

He was fired from Guardians 3 in July after old tweets emerged, where he appeared to joke about paedophilia and rape.

Guardians actor Dave Bautista has already offered to join him on the new project.

Image copyright Getty Images Image caption James Gunn has worked on both of the first two Guardians films with Dave Bautista

Newsbeat's been told that the new film would be a "new take" on the franchise rather than a direct sequel.

The first Suicide Squad, which starred Margot Robbie, Will Smith and Jared Leto, wasn't particularly well received by critics.

But it made $746m (£568m) when it came out in 2016 and a sequel and spin-off with Robbie's character Harley Quinn were announced.

It's not clear whether the same cast would be in James Gunn's new film.

Image copyright Getty Images Image caption Guardians of the Galaxy Vol 3 still doesn't have a director announced

The cast of Guardians of the Galaxy, including Chris Pratt, Bradley Cooper, Zoe Saldana and Vin Diesel signed an open letter in support of Gunn after his tweets were rediscovered.

He had previously apologised for them in 2012, but they got a lot more publicity this year when US right-wing website the Daily Caller republished them. James Gunn has been a critic of President Trump.

Dave Bautista, who plays Drax in the movies, tweeted: "Where do I sign up!" alongside a link to the news that James Gunn was writing the new Suicide Squad.

Bautista said in August that he would ask Marvel to "release me from my contract, cut me out or recast me" if they didn't use the script Gunn had written for Guardians of the Galaxy Vol 3.

A new director of Guardians 3 hasn't been announced since the director was fired in July.

Hundreds of thousands of fans signed a petition to reinstate him, arguing that the tweets had gone out before the first Guardians of the Galaxy film was released.

But Disney decided not to bring him back.

The move means James Gunn has left Disney's Marvel Cinematic Universe and joined Warner Bros' DC Extended Universe.

Joss Whedon - who directed the first two Avengers films - made a similar move, although in very different circumstances.

He took over 2017's Justice League when its director Zack Snyder stepped down after a death in his family.

Follow Newsbeat on Instagram, Facebook and Twitter.

Listen to Newsbeat live at 12:45 and 17:45 every weekday on BBC Radio 1 and 1Xtra - if you miss us you can listen back here.