Update: James Gunn has issued a statement to fans following his rehiring. See the statement below.

Whoa – here’s something totally unexpected. Disney has rehired James Gunn as Marvel Studios’ Guardians of the Galaxy Vol. 3 director after firing him months ago due to offensive, years-old tweets.

Deadline has the report, and they’ve confirmed with Marvel and with Gunn’s representatives that the filmmaker will indeed return to direct Guardians of the Galaxy Vol. 3 after the studio fired him last July. The outlet says this decision “was mulled and actually made months ago, following conversations with Disney studio leadership and the team at Marvel Studios,” and Walt Disney Studios president Alan Horn met with Gunn several times to talk about the situation before eventually deciding to bring him back into the fold.

After being booted from Disney and Marvel, Gunn was hired by Warner Bros. and DC to direct The Suicide Squad – a duty he will still fulfill. Marvel has agreed to wait until after Gunn is finished with The Suicide Squad before getting underway with Guardians 3. The studio was planning to use Gunn’s script anyway, and despite rumors that directors like Taika Waititi or Adam McKay were being considered to step in for him, apparently that was never on the table. Deadline says “Marvel Studios never met with or considered any other director” for the project.

It may be worth noting that at the Captain Marvel junket, Marvel Studios president Kevin Feige was asked about Gunn’s influence over the new slate of Marvel movies:

His influence was Guardians. It was Guardians. It was his input on Guardians and the Avengers films, as you’ve seen in Infinity War, and on the Guardians 3 script, which we’re still using. So you’ll see that influence. I think online, sort of the notion of ‘architect across multiple cosmic things’ was slightly blown out of proportion.

At the time, I read Feige playing down Gunn’s involvement as a form of damage control. It’s just interesting to now know that Feige was almost certainly aware that Gunn was back on board, and for him to still make that statement the way he did.

Last summer, Gunn’s old tweets – which were offensive, not funny, and shocking for shock’s sake, purposefully designed to provoke and get a rise out of people at a time early in his career – were dredged up by right-wing trolls who orchestrated a campaign to bring Gunn down. Gunn had already apologized for the tweets, but Disney got caught up in the whirlwind and acted rashly, prompting him to apologize again after he was fired and retreat from social media. The film’s entire cast published an open letter of support, not to mention the fact that Gunn was supported by dozens of filmmakers and heavy hitters in the industry. It was obvious to seemingly everyone but Disney that this was a politically-motivated attack, and we assumed the studio wouldn’t budge after making such a high-profile decision that sent shockwaves through the film community. Kudos to Disney for taking some time, assessing the situation, and making the right decision here.

Update: James Gunn posted a statement to Twitter thanking fans for their support in the months up to his rehiring by Disney.