The following contains spoilers for Doctor Strange in the Multiverse of Madness, now playing in theaters.

The Avengers' battle with Thanos for the fate of the Infinity Stones was a brutal one that almost resulted in the destruction of all life in the Marvel Cinematic Universe. But while some have laid the blame for all that chaos at the feet of certain heroes, things might have worked out for the best, given how dangerous things could have gone for the heroes.

Doctor Strange in the Multiverse of Madness reveals that another group of heroes from across the multiverse defeated their world's Thanos without resorting to the over-arching plans of Infinity War. However, the cost would have been far too great to take on.

RELATED: Doctor Strange Is Undoubtedly the MCU’s Best Babysitter

Doctor Strange being presente to the Illuminati in Multiverse of Madness

The primary alternate reality that takes up part of Doctor Strange in the Multiverse of Madness' plot is Earth-838. A largely peaceful reality protected by the Illuminati instead of the Avengers, Doctor Strange is introduced to the group after their own version of Infinity War and Endgame. The group is composed of Charles Xavier, Mister Fantastic, Black Bolt, Captain Marvel, Captain Carter and Baron Mordo, who has replaced his world's Doctor Strange as both Sorcerer Supreme and a member of the Illuminati after his death. It turns out that these heroes ended up "at war" with the forces of Thanos as well and were as desperate as the heroes of the MCU to stop his plans.

Like in the MCU, the ultimate resolution came down to a plan by Doctor Strange -- albeit one that had far worse consequences. Running out of options on their world, this variant of Strange elected to use the corrupting evil tome, the Darkhold. to Dream Walk, giving him the chance to venture across the multiverse and puppet his variants. This exposed him to new plans and ways to combat Thanos, hinting that there may have been solutions present that didn't require Doctor Strange's plan in the MCU. In fact, one of these solutions ended up being effective, resulting in Thanos' death during a conflict on Titan.

RELATED: Avengers: Endgame Had A Better Thor Than Chris Hemsworth For One Deadly Reason

Dr. Strange vs Thanos

After being somewhat corrupted by the use of the Darkhold, this variant of Strange discovered that his actions had actually set an Incursion in motion, resulting in one reality crashing into another, killing untold trillions in a flash. By venturing across the multiverse and weakening the walls separating different timelines, Strange was single-handily responsible for this event, to the horror of himself and his friends. Despite being vital in how they beat Thanos, Strange still surrendered himself to his allies because of his crime and didn't even resist when Black Bolt executed him.

This hints at the true cost of Doctor Strange subverting his plans from Infinity War and Endgame. Stopping someone like Thanos would always take sacrifice, and the ultimate cost of Endgame at least wasn't an entire reality. Throughout Doctor Strange in the Multiverse of Madness, various characters note with some anger that Strange's only way to beat Thanos resulted in untold pain thanks to giving Thanos the Time Stone and allowing him to kill countless (in the name of eventually restoring them all). Strange's ultimate decision resulted in the deaths of Iron Man, Black Widow and the Vision -- resulting in the Scarlet Witch's fury with Doctor Strange.

But it's clear that while other options might have been available in certain circumstances, Strange responded the best he could to the threat of Thanos in the MCU timeline. Attempting to use his magic to find a better way might have set off an Incursion as well. With the heroes of the MCU seemingly less conditioned to the bizarre limits of the multiverse, they may not have been able to counter before it destroyed their universe in the process. While Strange's actions may have briefly allowed the eradication of half of all life, he at least survived the battle with his soul intact and most of the universe restored. While there may have been other means, the cost to the heroes (and the world as a whole) would have been too great for the Avengers to take.

To see the other way Thanos met defeat, Doctor Strange in the Multiverse of Madness is in theaters now.