The end of Avengers: Infinity War left a lot of fans shocked as half of Earth’s mightiest heroes, as well as their allies from across the universe, were suddenly snapped to dust. That cliffhanger of an ending gave a lot of heavy lifting to Avengers: Endgame, especially when it comes to how those survivors of the snap deal with the aftermath of such a widespread attack on those they hold dearest to them.

Thankfully, writers Christopher Markus and Stephen McFeely wrote both movies, so they were able to carefully determine who lived and who died. The roster of survivors ended up shaping exactly how Avengers: Endgame would play out, including who lived and who died in this culmination of the Marvel Cinematic Universe. But for every decision made about who survived for this epic finale, there was the possibility of going an alternate route that changed the face of the movie, including who was considered for Avengers Endgame deaths. Keep reading to find out more, but beware of major spoilers.

In an extensive, spoiler-filled interview with Markus and McFeely, The New York Times asked how the writers determined who would survive the events of Infinity War in order to fight back in Endgame:

Markus: “We knew we wanted to see Cap and Tony dealing with the aftermath so that you could really see them suffer, quite frankly. And that’s why Cap and Natasha are relatively minimal in the first movie, because all they’d be doing is punching. We knew that they had a lot of story in the second movie, and there were other people who would have much more story in the first movie, like the Guardians.”

This sounds more and more like no matter how much Marvel Studios tried to keep Infinity War and Endgame regarded as two separate entities, the two movies are woven into each other’s DNA. Infinity War stands a little less stable on its own since it requires Endgame to payoff, but Endame works extremely well on its own, even if the story is based around the events that unfolded at the end of Infinity War.

Either way, the characters who don’t get a lot of screentime in Infinity War are fully fleshed out with the meat of the story, especially when it comes to emotional beats, in Endgame. But the writers acknowledge that Thor is the one who comes out on top with what amounts to two movies worth of story. That pays off with Thor getting arguably the best arc across Infinity War and Endgame, largely thanks to an outstanding performance by Chris Hemsworth.

Giving Thanos the Axe, Literally

Determining which of The Avengers lived or died after the snap wasn’t the only difficult decision that Markus and McFeely had to make about death. Markus and McFeely also had to figure out how to deal with Thanos in the aftermath of the snap, especially with regards to how The Avengers handle him in their quest to fix everything. The writers explained how they came to kill Thanos immediately:

McFeely: “We always had this problem. The guy has the ultimate weapon. He can see it coming. It’s ridiculous. We were just banging our heads for weeks, and at some point, [the executive producer] Trinh Tran went, “Can’t we just kill him?” And we all went, “What happens if you just kill him? Why would you kill him? Why would he let you kill him?” Markus: “It reinforced Thanos’s agenda. He was done. Not to make him too Christ-like, but it was like, “If I’ve got to die, I can die now.”

Indeed, killing Thanos comes off as a shocking act, especially since it removes any possibility of The Avengers using whatever he knows about the Infinity Stones to bring back everyone the titan snapped away. Suddenly The Avengers are left without anything to avenge. All they can do is settle in to their own failure. And that’s what makes their comeback that much more fulfilling and satisfying. They’re not heroes because they win. They’re heroes because they never stop fighting, even after they lose.

Infinity War Deaths Allowed the Living to Have Better Stories

Echoing the sentiments above about how they determined who lived and who died after the snap, Markus and McFeely offered up Hawkeye as the perfect example of someone whose story was enhanced by surviving Infinity War (especially since he didn’t appear at all). It allowed Hawkeye to go in a completely new direction:

McFeely: “He’s a good example of people who had much stronger stories after the Snap. What was the story to tell with Hawkeye in the first movie that was different than anybody else’s? Leaving his family to go fight again? Yeah, he did that in “Civil War.” The hope is that he’s killing bad people.” Markus: “There was a time where we contemplated having that archery scene in the first movie, after the Snap. You snap, and then you pop up in Clint’s farm — what are we watching? — and that’s the first indication it had a wider effect. But he literally had not been in the movie prior to that point. It’s cool, but it’s going to blunt the brutality of what [Thanos] did.”

Placing that Hawkeye scene after the snap would certainly have been jarring. It also would have taken away the impact that it has opening Endgame by immediately reminding you of the gut punch that everyone had to deal with no matter how far away they were from the events in Infinity War. It also sets the stage for the emotional finale between Hawkeye and Black Widow as each desperately wants to sacrifice themselves to obtain the Soul Stone in order to justify all the haunting decisions they’ve made in their past. Speaking of which, there was once a draft of the script where Clint was the one who ended up dying. The writers explained:

McFeely: “Jen Underdahl, our visual effects producer, read an outline or draft where Hawkeye goes over. And she goes, “Don’t you take this away from her.” I actually get emotional thinking about it.” Markus: “And it was true, it was him taking the hit for her. It was melodramatic to have him die and not get his family back. And it is only right and proper that she’s done.”

There have been some complaints about Black Widow’s death doing a disservice to the character. That’s mostly because some see her decision to sacrifice herself as being guided by the fact that Clint’s life somehow has more value because he has a wife and kids, and the latter is something she can never have thanks to her assassin training program. But from my perspective, it’s not that simple. In fact, she’s not sacrificing herself for Clint or his family. She’s sacrificing herself so her own makeshift family, all of The Avengers, can bring everyone else back and move on from this nightmare. The writers were very much aware of this when they decided Natasha had to die:

McFeely: “Her journey, in our minds, had come to an end if she could get the Avengers back. She comes from such an abusive, terrible, mind-control background, so when she gets to Vormir and she has a chance to get the family back, that’s a thing she would trade for. The toughest thing for us was we were always worried that people weren’t going to have time to be sad enough. The stakes are still out there and they haven’t solved the problem. But we lost a big character — a female character — how do we honor it? We have this male lens and it’s a lot of guys being sad that a woman died.”

If you think it’s a bit cheap that Natasha doesn’t get a funeral like Tony Stark, Markus explains, “That’s partly because Tony’s this massive public figure and she’s been a cipher the whole time. It wasn’t necessarily honest to the character to give her a funeral.” Instead, Natasha’s funeral comes in the form of The Avengers being reinvigorated to follow through on their plans to bring everyone back. Plus, there’s that touching coda between Clint Barton and Wanda Maximoff, each still reeling from the loss of Natasha and Vision.

Avengers: Endgame is playing in theaters everywhere now.