Known affectionately as the "A-Force" scene (and less affectionately as the "girl power" scene), a moment in the final battle with Thanos sees female Avengers Pepper Potts, Valkyrie, Scarlet Witch, Captain Marvel, Mantis, Shuri, Okoye, Gamora, Nebula and Wasp come together to help protect and transport the Infinity Gauntlet.
Critics called out the scene for being "superficial pandering," which it turns out was exactly what Marvel was trying to avoid. In the new book The Story of Marvel Studios: The Making of the Marvel Cinematic Universe, executive producer Trinh Tran reveals that test audiences had already expressed concern over the necessity of the scene (via CBR):
"In earlier cuts," Tran says, "When we started screen-testing it, there was a little concern for 'Does it come off [as] pandering? Are we going to get people saying, Oh you're just putting that scene in there just to put the scene in there. Does it actually have a story to tell with the rest of the narrative?' That was always a concern in the back of our heads."
To address the concern, new scenes were shot to show the female superheroes already working together in smaller groups.
According to CBR, "Tran was adamant that the scene remain in the film, so cutting it was never an option. Instead, Marvel Studios shot additional scenes featuring the same female characters in smaller groups, so when the group shot occurred, it had already been set up, making it flow more naturally."
The scene was inspired by a photograph of actresses Evangeline Lilly, Tessa Thompson, Brie Larson, Zoe Saldana, Scarlett Johansson and more, taken by Thor: Ragnarok co-writer Craig Kyle.
"During reception, Lilly connected with her fellow empowered actresses like Tessa Thompson, Brie Larson, Zoe Saldana and others," the book reads. "Seeing them bonding in front of him, Craig Kyle was inspired to try and capture the moment for his daughter back home."
"He asked Trinh Tran if she could collect them all for a group shot. Bringing those women together for that photo is what spurred their collective talk about an all-female Super Hero film that they then pitched to [Marvel President Kevin] Feige. And in the immediate future, it led to the expansion of the finale battle featuring all of their characters in Endgame."