The Avengers would have reverted the Snap without sacrificing Tony Stark if Thanos hadn't time-traveled to 2023 in Avengers: Endgame, but they committed some major mistakes in their mission to retrieve the Infinity Stones. Avengers: Infinity War became the Avengers' worst defeat when they failed to prevent Thanos from collecting all six Infinity Stones and decimating the universe. Five years later, they executed their counterattack, but Thanos showed up once again to stop them.

All of the previous 21 movies in the first three Phases of the MCU's Infinity Saga led up to the climax of Avengers: Endgame, where all of Earth's Mightiest Heroes assembled to fight Thanos and his minions in an all-or-nothing fight. As Doctor Strange predicted, Tony Stark was destined to give up his life in order to defeat Thanos, despite the Mad Titan's death at the hands of Thor.

Related: Everything Known About The Infinity Stones In The MCU (Before Thanos' Quest)

Perhaps it was a matter of destiny that several heroes had to commit questionable mistakes, such as Hulk getting caught unprepared by the Mad Titan during their hand-to-hand brawl, Star-Lord losing his cool and letting Thanos recover the Infinity Gantlet, or Thor failing to aim for Thanos' head with Stormbreaker. Worst of all, the Avengers let Thanos return after they killed him, all due to time travel.

Thor Killed Thanos After The Snap

Thor Kills Thanos at the Beginning of Avengers Endgame

All things considered, there was nothing the Avengers could have really done once Thanos did the Snap at the end of Avengers: Infinity War. Half of all life in the universe was already in the process of vanishing, and Thanos had reduced the Infinity Stones to atoms not long afterward. Thanos openly confessed this at the beginning of Avengers: Endgame and, as Nebula stated, her father is not a liar. This crushing defeat motivated Thor to decapitate Thanos, granting the Mad Titan a victorious death and leaving the universe without a concrete solution.

Scott Lang Returned From The Quantum Realm

Scott Lang is Brought Back from the Quantum Realm by a Rat in Avengers Endgame

In one of the most improbable coincidences of the MCU, a rat accidentally brought Scott Lang back from the Quantum Realm. Also conveniently, Scott only aged 5 hours in five years, unlike Janet van Dyne, who aged 30 years in real-time. This miracle was the Avengers' first step to save the universe, but it was also the beginning of Thanos' second chance to obliterate all life.

It was at this moment that Scott Lang, despite starting out as a common criminal, came up with one of the most dangerous weapons in history. Although Tony Stark and Smart Hulk executed it with Hank Pym's technology, it was Scott Lang's idea to use the Quantum Realm as a means of time travel. Not only would Thanos exploit this technology to travel to 2023, but Loki and Kang the Conqueror would also get the chance to travel through different timelines.

Related: What Ant-Man 3’s Quantumania Title Really Means

Tony Stark Invented Time Travel

Tony Stark and Thanos Time Travel in Avengers Endgame

Of course, time travel would have remained a mere fantasy without Tony Stark's genius mind. By Avengers: Endgame, Tony Stark was experienced enough with his craft to be able to invent a wristwatch-sized time travel device in his living room in the span of a single evening. He could have rejected the proposal to dedicate the rest of his life to his daughter Morgan, which would have been a logical decision, but for better or for worse, he didn't.

It's safe to say that no one else could have cracked the code. Although Smart Hulk is also a genius, he only managed to turn Scott Lang into an old man and a baby. Without the device, 2014 Thanos wouldn't have known about his future victory, and the MCU would probably have kept Tony Stark as Earth's protector through Phase 4 and beyond.

The Avengers Acquired The Infinity Stones In The Time Heist

Thanos and the Infinity Gauntlet after the Avengers Endgame Time Heist

Yet another accidental aid for 2014 Thanos was the success of Avengers: Endgame's Time Heist. There were lots of variables that could have easily gone wrong for any of the time-traveling squads: Thor was far too unstable to retrieve the Aether, Rocket Raccoon could have been captured by Malekith, Captain America could have been captured when stealing Loki's Scepter, Tony Stark could have been caught stealing the Tesseract in 1970, and the wrong combination of heroes wouldn't have been able to sacrifice each other to retrieve the Soul Stone.

Everything turned out perfect and the Avengers brought all six Infinity Stones to 2023. But Thanos once again got extremely lucky when Tony Stark built a nanotech Infinity Gauntlet. The nanotech allowed it to be wielded by someone with hands the size of Hulk's, which helped the Gamma-infused giant snap his fingers, but also allowed Thanos' hand to fit perfectly. Such a little detail jeopardized all of the Avengers' efforts, as Thanos wouldn't have achieved anything if he couldn't wield the Infinity Stones. It's curious how the fate of the universe had to come down to something as trivial as glove size.

Related: Loki's Time Travel Should Introduce Thor's Kids In Phase 4

2014 Nebula Replaced 2023 Nebula

2014 Nebula in Guardians of the Galaxy and 2023 Nebula in Avengers Endgame

Nebula's anatomy might be the most crucial part of Thanos' counter-counterattack. Nebula happened to have a partially cybernetic head, including a computer-like memory and an eyeball projector that helped Thanos understand what the Avengers were doing in 2023. This may be one of Thanos' only achievements in Avengers: Endgame that can be attributed to his own merits, although he never could have guessed that torturing Nebula would have helped him get a second chance at universal genocide.

The Time Heist also happened to synchronize the consciousness of Nebula at different points in the timeline, and her new faceplate happened to be easy to replace in order to impersonate her. If Nebula hadn't switched allegiances between Guardians of the Galaxy Vol. 2 and Avengers: Endgame, Thanos wouldn't have been able to have a sleeping agent near the Quantum Portal, but an opportunity landed in his lap, and he gladly took it.

Thanos Reverse-Engineered the Pym Particles

Thanos and the Pym Particles in Avengers Endgame

At some point after Thanos captured 2023 Nebula and, he realized that the Avengers were using Pym Particles to time travel. So, The Mad Titan reverse-engineered a single vial and found a way to connect with the Avengers' Quantum Portal without any special suits or limited vials. This feat is something that the Russo Brothers chose to leave off-screen due to its implausibility, but it has been considered a plot hole by many fans nonetheless.

It's true that Thanos and the Black Order could easily get their hands on advanced technology, but it's unlikely that they recreated a game-changing invention so quickly. Then again, the time the Avengers spent between the Time Heist and Hulk's Snap doesn't have to align with the time Thanos spent trying to develop his own technology. Still, Thanos somehow found a more effective method to transport himself and thousands of other minions to 2023 without any special equipment, and there was nothing the Avengers could have done to stop him at this point.

Related: MCU Phase 4's Most Powerful Villain Repeats The Thanos Problem

The Avengers Left Nebula Alone With The Quantum Portal

Nebula and The Quantum Portal in Avengers Endgame

Up to this point, everything the Avengers unwittingly did to help Thanos was a crucial part of their own plan to gather the Infinity Stones and bring their loved ones back. However, their heroic mission wouldn't have had any negative side effects if they had paid more attention to Nebula, who used the Quantum Portal as a gateway for her father. It only took a couple of switches to bring in a whole intergalactic army from the past and put the universe at stake - all because the Avengers were celebrating their Snap.

Avengers: Infinity War and Avengers: Endgame were full of coincidences and near-misses, but Doctor Strange and Tony Stark knew it all had to end as it did - and it paid off, given the odds of winning were only 1 in 14,000,605.

More: Endgame Still Means The MCU Has An Infinity Stones Problem

Key Release Dates