Inside Captain Marvel's Long, 'Tough' Road to 'Avengers: Endgame' (Exclusive)

Avengers: Endgame, Brie Larson
Courtesy of Marvel Studios

How Brie Larson discovered Carol Danvers alongside Earth's mightiest heroes.

Avengers: Endgame is an end to Marvel's cinematic universe as we know it, the 22nd film in a series of interconnected films that will serve as a swan song for a number of heroes fans have followed over the last decade. Filming of the movie also marked the official introduction of Carol Danvers into this universe, as Brie Larson actually wrapped Endgame in 2017 before shooting began on her solo film in early 2018.

"We did have the fortunate side of working with Brie first. So, it was a learning process of getting to understand the character in this movie before she jumped to theirs," producer Trinh Tran tells ET. "It was a very interesting experience, because she came in and saw all these characters and it's like, 'OK! The Avengers, Hello,' before doing her solo movie."

There is an alternate timeline that saw Captain Marvel onscreen as early as 2012. (Joss Whedon wanted to include her in a cameo in Age of Ultron.) In actuality, Kevin Feige wouldn't announce her solo film until 2014, slated for a 2018 release date. Her inclusion in Infinity War - Part II, as it was known at the time, was committed to the page the following year: Writers Christopher Markus and Stephen McFeely, while on set of Civil War, began breaking the story for Infinity War and Endgame, which were conceived and outlined together and then written and filmed back-to-back.

When the team slotted her into their plans for Endgame, there was no Captain Marvel script to consult as they wrote the character. "When we started this there was nothing for nothing," McFeely recalls. "A lot of this was predictive, where it's like, "Let's hope this chimes with the character a bit," Markus adds.

"It was up to Brie to start a character years and years after she was going to play the character for the first time," McFeely says. "I have a lot of sympathy for her. That's a tough acting job, to get in your head real fast."

Ultimately, the team trusted in "the Marvel machine," that audiences would fall for Carol in her solo film and be that much more excited when she joined up with Earth's mightiest heroes. And though Endgame may have been the learning experience by which Larson and her Captain Marvel directors (Anna Boden and Ryan Fleck, who were on set for Larson's first day) honed in on the look and voice of the character, the Carol we see in Endgame should be one that her fans recognize.

"It's making sure the other team is aware of what we're doing, as well as vice versa. Communication was very important between both teams, so that the character stays in the same path that we wanted her to go in," Tran explains. "We definitely worked closely with the Captain Marvel team to make sure there's a consistency in that character as well."

McFeely puts it more bluntly, "It's not a different person. It's not like she got hit in the head or anything."

Viewers saw a glimpse of Carol's first interactions with the Avengers in the end-credits scene of Captain Marvel, a sequence that was shot by the Russo Brothers during production of Endgame and which Tran asserts was always intended to be the stringer of that film, as opposed to something plucked from their film later on in the process.

"We specifically came up with that scene knowing that that's what we wanted to tell," Tran says. "We wanted to know exactly where that was going to lead to this particular movie. That is supposed to be the tease to how she was going to appear here."

Carol joins the team at a particularly exciting time. Though no one will comment on which other characters she shares scenes with (even Chris Hemsworth's Thor, who Carol appears with in the trailer, prompts Tran to laugh, "Was what you saw real? I'm not sure!") the first female hero to headline her own film joins a roster that boasts significantly more women than the first Avengers outing.

"Look at that," Tran smiles, looking to an Endgame poster. "Me, personally, I am so happy to see more woman representation up there. It is very important to me because starting at Marvel over 10 years ago, there would be days where I'm sitting there and everybody is male and I'm in there going, 'What am I doing here? This is crazy!' You know, Scarlett [Johansson] was the same way on the first Avengers. She was the only female in that group. To be able to open those doors and allow more women in is, to me, a dream come true."

"I think diversity is so important, especially going forward, and I'm so happy that Captain Marvel is out there, finally," the producer adds, explaining that the success of Black Panther and Captain Marvel has affirmed Marvel's belief that moviegoers will embrace stories told from different perspectives and has encouraged the studio to continue to do so. "Because there are so many characters left in Marvel that we haven't explored, so why not?"

Avengers: Endgame opens in theaters on April 26.