The latest Marvel Cinematic Universe (MCU) series Ms. Marvel sees Iman Vellani take on the role of the titular character that is poised to play a larger role in the future. In the series, Vellani’s Kamala Khan, a.k.a. Ms. Marvel, declares herself to be a huge fan of Brie Larson’s Captain Marvel (Vellani happens to be a huge Marvel fan in real life too). She even goes on to dress as her favorite superhero while attending the fictitious AvengerCon.

RELATED: Tom Holland Totally Spoiled Spider-Man: No Way Home For Marvel Newcomer Iman Vellani

And while Marvel has confirmed fans will see Vellani and Larson together in the upcoming film The Marvels, some fans are a little disappointed that the actresses didn’t get to share the screen on the show. As it turns out though, that may have been the plan all along.

Brie Larson’s Captain Marvel Appears Briefly In The Ms. Marvel Finale

At the end of Ms. Marvel, Kamala comes into her own. Not only does she get better at handling her powers, but she also learns a lot more about her family, including how the bangle that triggered her powers came into possession.

At the same time, it also revealed what really happened to Kamala’s great-grandmother Aisha (Mehwish Hayat) and how Kamala traveled back in time to save her grandmother from Clandestine leader Najma (Nimra Bucha).

RELATED: Iman Vellani's Marvel Audition Started Out 'Super Sketchy,' But Became Her Big Break

Meanwhile, in the post-credits scene, Kamala is hanging out in her room following her confrontation with the Department of Damage Control when her bangle begins to glow.

And as she stands up from her bed, she appears to get warped out of her bedroom as a confused-looking Captain Marvel suddenly finds herself in Kamala’s room.

Kamala Khan And Brie Larson Almost Met In Ms. Marvel

While Larson only ended up appearing in the Ms. Marvel post-credit scenes, it turns out there was an initial idea to have Kamala and Carol Danvers meet early on in the series. “Certainly at the very, very, very beginning, way back when, that was part of the conversation,” Bisha K. Ali, Ms. Marvel’s showrunner confirmed.

As they continued to work on the show, however, they realized that the meeting didn’t necessarily have to take place in the story. “It really had to be about her and her community, her family and her friends,” Ali explained.

“She’s looking in the mirror at the end — she’s not seeing an imitation of Captain Marvel the way that she’s seeing in Episode 1. She’s seeing Kamala wearing a suit that her mother made for her, with the masks that Bruno made for her, with the sash from Red Dagger — then, moments later, she gets her name from her own father. That moment is about her becoming her in her own right.”

She also added that the story would have “taken it off in a different direction” if Kamala met Carol there. “In this character arc, it felt really important, actually, that they didn’t meet,” Ali added.

RELATED: Will There Be A Thor 5 After Thor: Love And Thunder?

In the end, they just decided to go with a post-credit scene that features Larson, although the actress never had to make her way to the Ms. Marvel set since The Marvels director Nia DaCosta took care of it from her own set.

“She [DaCosta] was on set with Brie Larson and Iman, and she didn't know that scene was going to be used for the post-credit scene,” Adil El Arbi, who directed the first and final Ms. Marvel episodes with Bilall Fallah, revealed.

“Marvel is very good in separating all the things. So, we would always ask Kevin, ‘Yo, when's Captain Marvel going to show up?’ And he would always tell us, ‘Don't worry about it. You'll see.’ Meanwhile, he has said to Nia DaCcosta, ‘Just shoot that scene. We need that. And you'll see.’ All of a sudden, when we were calibrating the final episodes after the credits, we said, ‘Oh. There's Captain Marvel.’”

And while fans are yet to see Vellani and Larson together onscreen, the two stars have been in touch since Khan landed her Marvel role. The Oscar winner was among the first to reach out to Vellani after she got cast in the MCU.

“She was the sweetest. I was really shy, and I felt like everything I wanted to ask would have been stupid, but she didn’t make me feel like that,” Vellani recalled of her first Zoom conversation with Larson.

“She really wanted to be there for me, because even though she was already an established actor, being in Marvel changed her career forever. The sheer amount of attention you get being a Marvel actor is completely unmatched to anything else in this industry, and she wanted to prep me for that mentally and hold my hand throughout it.”

Later on, Larson was also among the first to let Vellani know that she would be joining her in The Marvels as well.

“Right before they announced The Marvels cast, I get a text from Disney PR, I get a text from Brie Larson and I get a text from our producers all at the same time saying I’m in the movie, and then they announced it on the screen,” the actress revealed.

“I had a hunch I was going to be in it, but more of a cameo role, not an actual main character, so it was cool.”

The Marvels is expected to premiere on July 28, 2023, as part of Marvel Studios’ exciting Phase 5 production slate.