Avengers: Endgame screenwriters Christopher Markus and Stephen McFeely have spilled the beans on why they killed off some of Earth's Mightiest Heroes in the MCU's 22nd film, including Scarlett Johansson's Black Widow.

In a wide-ranging spoiler chat with the New York Times, Markus and McFeely revealed why secret agent-turned-superhero Natasha Romanoff died in Endgame.

As McFeely explained: "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."

He continued, "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."

Markus elaborated on why Endgame gave Tony Stark a funeral but not Natasha.

"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," Markus said. "The biggest question about it is what Thor raises there on the dock. 'We have the Infinity Stones. Why don’t we just bring her back?'"

McFeely called Natasha's sacrifice for the Soul Stone as an "everlasting exchange," seemingly closing the door on the character ever being resurrected. "You bring her back, you lose the stone."

There was a version of the Endgame script where it was Clint Barton (Hawkeye/Ronin) who sacrificed himself on Vormir, but the writers credit visual effects producer Jen Underdahl with pushing to make it Natasha's sacrifice and not Clint's. The writers agreed with Underdahl, saying it would have been "melodramatic" to have Barton die without getting his family back.

What did you think of Endgame killing off Black Widow? Let us know in the comments!

For more on the latest MCU film, check out all the Endgame Easter Eggs we found, our Avengers: Endgame Explained story, are attempt at figuring out Endgame's time travel rules, our biggest Avengers: Endgame questions, who that kid was from Tony Stark's funeral, or how Captain Marvel rescued Iron Man in space.