WARNING: The following article contains major spoilers for Avengers: Endgame, in theaters now.

Stephen McFeely and Christopher Markus, the screenwriters for Avengers: Endgame, have revealed a rejected idea for a plotline in the film's time-traveling second act that would have seen Thor and Iron Man partner up.

McFeely recently spoke about an initial idea that had the Asgardian and billionaire genius working together as the remaining heroes split off to travel back in time to acquire the Infinity Stones.

"Our first draft was a version where Tony and Thor go to Asgard," McFeely said in an interview with Fandango. "Because I like the idea of Tony  going to Asgard and seeing science versus magic."

RELATED: Avengers: Endgame Writers Address Captain America's On-Screen Future

The two would've gone back to the events of Thor: The Dark World in 2013. The plan would be for them to take advantage of the fact that there were technically two stones in Asgard at the same time, since the Reality Stone, taken from the Dark Elves following the events of The Dark World, and the Space Stone were both in Odin's vault.

The two Infinity Stones were only there together for a short time before the Reality Stone was entrusted to The Collector and the Tesseract was stolen by Loki during the destruction of Asgard in Thor: Ragnarok.

While a simple mission on paper, its execution would have been anything but. Tony would have tried to use a stealth suit to fight the all-seeing Heimdall, who would have seen through his attempts at stealth. It would have been a return appearance for Idris Elba following Heimdall's heroic death at the beginning of Infinity War.

RELATED: Avengers: Endgame Breaks the MCU's Timeline for Good

Any ideas for a partnership between Iron Man and Thor eventually got shot down in the writers' room.

"I think [co-director] Joe Russo read it, and he goes, 'Why aren't we going to The Avengers? It's only the most exciting movie,'" McFeely recalls.

At Russo's instruction, Tony instead went with Captain America, the Hulk and Ant-Man to 2012 in New York for both the Space and Mind Stones.

Meanwhile, Thor was joined by Rocket Raccoon in Asgard, which allowed the God of Thunder to speak with his mother Frigga on the day she would die. Despite it all working out for both the writers and heroes, McFeely's comments still provide fans of Earth's mightiest heroes a tantalizing look at what could've been.

Directed by Joe and Anthony Russo, Avengers: Endgame stars Robert Downey Jr. as Iron Man, Chris Evans as Captain America, Mark Ruffalo as Bruce Banner, Chris Hemsworth as Thor, Scarlett Johansson as Black Widow, Jeremy Renner as Hawkeye, Brie Larson as Captain Marvel, Paul Rudd as Ant-Man, Don Cheadle as War Machine, Karen Gillan as Nebula, Danai Gurira as Okoye and Bradley Cooper as Rocket, with Gwyneth Paltrow Pepper Potts, Jon Favreau as Happy Hogan, Benedict Wong as Wong, Tessa Thompson as Valkyrie and Josh Brolin as Thanos.