Avengers: Infinity War. Warning: The following story contains MAJOR SPOILERS for Marvel Studios

The screenwriters of Avengers: Infinity War always knew the ending to their movie would be emotional, but they didn't quite grasp how emotional until they saw the actors performing it for the first time. “As you're writing these things, you have to be fairly calculating and cold,” Christopher Markus told BuzzFeed News. “You know, I don't tear up every time I read it. But to see the characters fully rendered, and to see the actors’ faces processing that loss, it’s pretty profound.” “That loss” consists of arguably the most brutal, devastating conclusion in a massively popular franchise movie ever. (And if the previous warnings weren't already clear, the rest of this story contains MAJOR SPOILERS.) After collecting all six Infinity Stones, cosmic villain Thanos (Josh Brolin) snaps his fingers and causes half the population of the universe to disintegrate into ash, including over a dozen of Marvel Studios’ most celebrated superheroes, like Black Panther (Chadwick Boseman), Spider-Man (Tom Holland), Doctor Strange (Benedict Cumberbatch), and almost all of the Guardians of the Galaxy. To say the ending has made people emotional is a bit like saying the movie made a lot of money on its opening weekend. “It really seemed to be a gut punch to people in a way that I didn't fully [realize],” said Markus. But what do all these deaths mean? Are these characters all really dead, or will they somehow return in the untitled Avengers movie that was filmed alongside Infinity War and is due to open a year from now? To answer these questions and more, BuzzFeed News grilled Markus and his writing partner Stephen McFeely, and got some surprising answers.

They always knew Thanos would succeed — they just had to figure out when. Marvel Studios

Infinity War and its sequel are based in part on the 1991 Infinity Gauntlet comic series by Jim Starlin. Thanos succeeds in his quest in that comic, and Markus and McFeely said that they and their main collaborators — directors Anthony and Joe Russo along with producer and Marvel Studios chief Kevin Feige — never seriously entertained the idea that their films wouldn’t also include Thanos’s apocalyptic snap of his fingers. “This is the hero's journey for Thanos,” said McFeely. “By the end of the hero's journey, our main character, our protagonist — at least, in this case — gets what he wants.” At first the writers weren't quite sure when in the two films Thanos’s snap would come, until they ultimately realized that putting it at the climax of Infinity War would give that film its strongest ending. “Even if the end is a tragedy, we wanted it to be definitive,” said Markus. “To say, ‘Oh my gosh, what's he going to do?! He's only got one [Infinity Stone] left! I wonder if he'll get the other one!’ That just seemed like ‘Tune in next week’ jerking around.”

Deciding who was going to turn to dust was about setting up the story for Avengers 4. Marvel Studios

If it seemed like many of the characters who died at the end of Infinity War also got the most screentime in Infinity War — and that several of the Marvel Cinematic Universe’s biggest characters, like Captain America (Chris Evans) and Black Widow (Scarlett Johansson), got short shrift — that was by design. “We had so many characters in movie 1, and we knew it was a two-movie conversation,” said McFeely. “Some characters were better served in movie 2 after this event. We were making some choices based on some characters we knew were going to leave us at the end of the first movie, so they got highlighted in the first movie. And some who were going to be in the second movie more maybe got less attention or less screentime [in Infinity War] — I'm thinking of Cap and Natasha, specifically. It's about the story we wanted to tell in movie 2, mostly.”

Guardians of the Galaxy director James Gunn and star Chris Pratt made a small but crucial change to the script. Marvel Studios

In Infinity War, Gamora’s knowledge of the whereabouts of the Soul Stone — the only missing Infinity Stone — leads her to make Star-Lord (Chris Pratt) promise to kill her should Thanos, her father, ever capture her. In the original script, when Thanos does take Gamora, Star-Lord ultimately can't bring himself to pull the trigger. But Gunn and Pratt both said he would. “The more I think about it, the better it is that it got changed,” said McFeely. He pointed out that Thanos’s use of the Reality Stone to have Star-Lord’s gun fire bubbles instead allowed the screenwriters to include a callback to the moment later in the film. But more broadly, Star-Lord’s decision to kill the woman he loves tied in with Infinity War’s underlying theme that doing what you believe to be the right thing can come at a terrible personal cost. “Thanos has that same choice later [to kill Gamora], and he chooses to do it and succeeds,” said McFeely. “Wanda has that same choice later [with Vision]. A lot of characters have really tough choices to make.”

Speaking of tough choices, Markus and McFeely didn't know killing off T’Challa would be quite so painful for fans, but they have no regrets. Marvel Studios

“First of all, we would do it all over again,” said McFeely about their shocking decision to turn Black Panther to dust. “But remember, when we’re writing [Infinity War], and even shooting, there is no Black Panther movie. We don’t know it’s going to be so good, so effective, so resonant. And we had to treat all these characters the same. People who leave us [in Infinity War] are the leads of their own franchises. And Black Panther’s no different.” Killing characters as major as Black Panther and Spider-Man also helped drive home for audiences just how immense Thanos’s victory was. “We wanted that thing that happens at the end of that movie to have as much impact as possible,” said Markus. “If you're very carefully getting rid of your supporting cast, then it does seem like you’re pulling your punch.”

They weren't thinking about the next Black Panther, Spider-Man, and Guardians of the Galaxy movies. Marvel Studios

As McFeely acknowledged, anyone paying attention to the historic success of Marvel Studios’ entire slate of films knows that several of the characters who died at the end of Infinity War front their own lucrative movie franchises. Prior to the release of Infinity War, Feige talked explicitly about the next Spider-Man movie. Gunn announced in 2017 that he was writing and directing Guardians of the Galaxy Vol. 3. And if there were no Black Panther sequel, the shareholders of Disney would likely revolt — not to mention the fans. Because these characters are almost certainly returning for more movies down the line, audiences could come to regard the deaths in Infinity War cynically. But Markus and McFeely said they had to set aside that kind of thinking when writing Infinity War. “We can’t make movies assuming you know how movies get made,” said McFeely. “We can just tell the best version of the story we can, and hopefully you are investing in that story while you’re in it, and you feel appropriate sadness or joy while you’re in it. We can’t account for having one step outside the movie theater while you’re watching it. We would be terrible storytellers if we did that.”

But don't expect Avengers 4 to “fix” things — at least, not in the way you might anticipate. Marvel Studios

Understandably, Markus and McFeely chose their words carefully when talking about Avengers 4. But listening to them talk about how Infinity War’s deaths — including the more, er, traditional deaths of Loki (Tom Hiddleston), Heimdall (Idris Elba), Gamora (Zoe Saldana), and Vision (Paul Bettany) — will affect Avengers 4, it seems pretty clear characters won’t be resurrected good as new like they are in the comic, or at least without some great cost. “[Avengers 4] doesn’t do what you think it does,” said Markus. “It is a different movie than you think it is.” Then he paused. “Also…[the deaths are] real. I just want to tell you it’s real, and the sooner you accept that, the sooner you will be able to move on to the next stage of grief.” McFeely broke in. “Put it this way,” he said. “I think [Infinity War] is a fairly mature movie for a blockbuster. It’s got a lot of fun in it, obviously, but boy, it gets very mature. The second one is also mature. We’re going to own these choices, and hopefully surprise and delight you and get you invested. It’s by the same studio, the same filmmaking team. They were written at the same time, shot at the same time. They’re clearly connected, but they are definitely two different movies, one of which is dependent on what happened previous.” “We broke your heart,” added Markus. “Now we're going to blow your mind!”

The next two Marvel Studios movies — Ant-Man and the Wasp and Captain Marvel — are key to understanding the events in Infinity War and Avengers 4. Ben Rothstein / Marvel Studios

The post-credits scene in Infinity War features a disintegrating Nick Fury (Samuel L. Jackson) appearing to send an SOS to the as yet unseen Captain Marvel via a mysterious-looking pager — suggesting that the character, who will be played by Brie Larson, will perform a significant role in Avengers 4. According to Markus and McFeely, however, fans should also pay attention to what happens in the Captain Marvel movie opening in March 2019 — as well as in Ant-Man and the Wasp, opening in July this year, and starring Paul Rudd and Evangeline Lilly as the title characters. “Put yourself in our positions two years ago,” said McFeely. “We’re looking at a blank wall, and it says Avengers 3, Ant-Man and [the] Wasp, Captain Marvel, Avengers 4. So there are four big shoeboxes, and we’re responsible for the bookends. As we’re going through deciding what we want to do, we have these two shoeboxes in the middle that you can either look at as burdens or opportunities.” Other than “very small suggestions” from the Avengers team, McFeely emphasized that the filmmakers for Ant-Man and the Wasp and Captain Marvel “got to make exactly the movies they wanted.” But those movies will still be tied to the events in Avengers 4 in some meaningful ways. “My hope is the conversation you and I will have a year from now, you’ll have a sense of the choices we’ve made over the course of an entire year of Marvel movies,” said McFeely. “There’s a relationship between them all.”

And don't forget about Hawkeye! Marvel Studios