Screenwriters Christopher Markus and Stephen McFeely were quite aware how polarizing it would be to kill off the MCU's first female superhero.

The death of Black Widow (Scarlett Johansson) was one of the big shocks in “Avengers: Endgame,” and it also turned out to be one of the film’s most controversial storytelling choices. Black Widow sacrifices herself on Vormir so that the Avengers can obtain the Soul Stone and help defeat Thanos. Black Widow and Hawkeye (Jeremy Renner) have an altercation to decide who will be sacrificed. A new Vanity Fair interview with “Endgame” screenwriters Christopher Markus and Stephen McFeely confirms “there was an alternate sequence shot in which Hawkeye is the sacrifice instead.” How did the writers decide which superhero to kill? McFeely points to two reasons and admits the Black Widow choice was made “not without some controversy.”

“We certainly thought long and hard about it,” McFeely said. “We knew we were killing the first female hero of the Marvel Universe. We stupidly came up with these rules in the first movie — someone’s going over that cliff. So we had to decide. By the way, you had to easily love the person next to you, so we couldn’t send Steve Rogers and Hulk. So it’s a puzzle of our own making, but it felt like it was the resolution of her arc, that if she could sacrifice herself for her new family and for half the universe, that was worth it to her.”

McFeely also said that female crew members on the “Avengers: Endgame” set pushed them to stick with killing off Black Widow over Hawkeye. “A number of women on the crew, when we said, ‘Hey, we’re thinking maybe Hawkeye goes over,’ said, ‘Don’t you do that! Don’t rob her of this!'” McFeely said. “And then it choked me up because I think we would have a much different conversation if Hawkeye had pushed her aside.”

McFeely added, “I’m really proud of that moment. I don’t have any regrets. The only regret is that it comes at the end of Act Two. So you can’t really roll around in the grief because we’ve got another hour of movie and we haven’t solved the A-plot problem. So that’s the downside.”

While Black Widow was killed off in “Endgame,” the character and Scarlett Johansson will return to the Marvel Cinematic Universe next year with the Cate Shortland-directed prequel movie “Black Widow.” Disney is opening the comic book tentpole May 1, 2020.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.