“How the MCU Was Made” is a series of deep-dive articles that delve into the ins and outs of the development history, production, and release of all the Marvel Studios movies.

First, there was an idea. While press surrounding 2008’s Iron Man brought up the notion of an Avengers movie as a possibility, Marvel Studios president Kevin Feige downplayed it a bit, noting that these first few movies had to work in order to get to The Avengers. Well, they worked. And they worked considerably well. Iron Man was a huge success; Iron Man 2 was a huge financial success; and Thor and Captain America: The First Avenger launched franchises for new heroes. Only The Incredible Hulk felt like something of a failure, but even then it was quickly brushed off. So they were really going to do this thing. They were going to make an Avengers movie, combining characters from separate movies into one team-up movie, in a move that had plenty of precedence in comic books, but none in the realm of feature films. This is the story of how they pulled it off.

When Marvel Studios first set out to make its own films independently, they had a room of writers working on scripts for potential films that may or may not ever get made. Something like Nick Fury never saw the light of day, but Nicole Perlman’s script for Guardians of the Galaxy was good enough to move that property to the front of the pile. The first screenplay for Marvel’s The Avengers actually dates back to 2007, before Iron Man had even been released. At that point in time, Marvel hired Elektra and eventual Ready Player One co-writer Zak Penn to write a screenplay for The Avengers.

RELATED: How the MCU Was Made: 'Iron Man's Casting Battles, Improvised Script, and a Secret Stinger

Penn described his role all these years as something of a guiding force for the Phase One Marvel movies, keeping track of what heroes were being used and how they could figure into The Avengers:

“I was officially attached to 'The Avengers' in 2006, although we had been kicking around the idea since 2003. For me, it was a four-year process. During that time, my job was to keep an eye on all the other movies, write in stuff that could be set up and paid off, and with the help of the Marvel executives, create an overarching story or a bible for the five movies, so we would know where we were going and where 'The Avengers' would be. We didn’t want to be stuck in the end with a bunch of characters we didn’t want to use. Or not having set up certain characters.”

The Avengers Robert Downey Jr
Image via Marvel Studios

Following the successful release of Iron Man in 2008, Marvel announced a July 2011 release date for Marvel’s The Avengers, to be released under Marvel’s extended distribution deal with Paramount Pictures (which would eventually be reworked—but we’ll get to that later).

As for who would direct The Avengers, well that was a tricky subject. Jon Favreau provided the foundation for the Marvel Cinematic Universe when he directed Iron Man, but when it came time to bring Favreau back for Iron Man 2, the filmmaker understandably lobbied for a raise. At this point in time, Marvel Studios was still under the control of notoriously cheap Marvel Entertainment CEO Ike Perlmutter, and had already been through a number of contract disputes with actors. Reportedly, Marvel’s execs were none too happy about what they had to pay to get Favreau back for Iron Man 2, and as a result declined to let him direct The Avengers.

Indeed, Favreau had previously expressed interest in spearheading The Avengers movie and he was an obvious choice to take the helm, but the combination of the pay dispute on Iron Man 2 and serious creative differences while making that film somewhat soured that prospect. Favreau quickly moved to Cowboys & Aliens after Iron Man 2, but at the time made no secret of the challenges that lay ahead for whoever directed The Avengers:

"They'll have to [find a different director], because I'm not going to be available. It's something I'm being the executive producer on, so I'll definitely have input and a say… It's going to be hard, because I was so involved in creating the world of Iron Man and Iron Man is very much a tech-based hero, and then with Avengers you're going to be introducing some supernatural aspects because of Thor. How you mix the two of those works very well in the comic books, but it's going to take a lot of thoughtfulness to make that all work and not blow the reality that we've created."

RELATED: Cinematographer Matty Libatique on 'The Prom', Making 'Iron Man' 1 and 2, and the Importance of Physical Media

In April 2010, Marvel Studios finally found their director: Joss Whedon. He was a somewhat unexpected choice, having only directed one unsuccessful feature film at the time (Serenity), but he certainly carried with him an intense amount of “geek cred” having created the TV shows Buffy the Vampire Slayer and Firefly. He also had plenty of experience handling ensemble casts, and indeed in hindsight it makes sense that for the Avengers movies, Marvel looked to directors with lots of experience in television (see also: The Russo Brothers).

Joss Whedon The Avengers
Image via Marvel Studios

As part of Whedon’s deal to write and direct The Avengers, he also did a rewrite on Captain America: The First Avenger, which started filming that summer. But when it came to Penn’s existing script for The Avengers, Whedon didn't hide his displeasure:

“I started at square 1 on the script. I mean, straight up. I don't wanna rag on it, but I fought that credit. I was very upset about it. I know how the [Writers] Guild works, first guy on a movie and all that, but I've never had good luck with arbitrations… I read it one time, and I've never seen it since. I was like, ‘Nope. There's nothing here.’ There was no character connection. There was a line in the stage directions that said, apropos of nothing, ‘And then they all walk towards the camera in slow motion because you have to have that.’ Yeah, well, no: You have to earn that.”

Penn, meanwhile, wasn’t exactly thrilled he was being rewritten, but maintains he respects Whedon’s decision to go at the script solo:

“We could have collaborated more, but that was not his choice. He wanted to do it his way, and I respect that. I mean, it's not like on the 'Hulk,' where I got replaced by the lead actor.”

Which, well, we’ll get to that later too.

Tom-Hiddleston-Loki-The-Avengers-movie-image
Image via Marvel Studios

When Whedon set in on the script, it went through a few different iterations — including potentially adding more villains in addition to Tom Hiddleston’s Loki:

“We went through a lot of insane iterations of what might be. At the very beginning, I wrote entire drafts that had no bearing on what I would eventually film. There was a moment where we thought we weren't gonna have Scarlett [Johansson], and so I wrote a huge bunch of pages starring The Wasp. That was not useful. I also worried that one British character actor was not enough to take on Earth's mightiest heroes, and that we'd feel like we were rooting for the overdog. So I wrote a huge draft with Ezekiel Stane, Obadiah Stane's son, in it. Kevin looked at it and said, ‘Yeah, no.’ [Marvel Studios co-president] Louis D'Esposito actually at that point said, ‘Yeah, Kevin, it's all wrong, but look how good it is. Like this is really good wrong.’ That was a nice boost.”

Once the story was settled, it came time to fill out the cast. Robert Downey Jr., Chris Evans, and Chris Hemsworth were all set to reprise their roles as Iron Man, Captain America, and Thor, with Scarlett Johnasson also poised to return after her Black Widow debut in Iron Man 2 and Samuel L. Jackson assembling the team as Nick Fury. The new major character was Hawkeye, which Jeremy Renner had been eyed for since his breakout role in The Hurt Locker, but Supernatural actor Jensen Ackles (who was in the running to play Captain America) was also rumored to be in the mix. Ultimately, Renner signed on.

Then came that pesky Hulk. Edward Norton filled the role of Bruce Banner in The Incredible Hulk, but took over screenwriting duties himself on that film and was locked in many creative battles with Marvel over the movie's direction — all the way up through post-production. So when it came time to make The Avengers, Marvel put out a statement that essentially fired Norton in public back in July 2010 — weeks before Comic-Con:

“We have made the decision to not bring Ed Norton back to portray the title role of Bruce Banner in the Avengers. Our decision is definitely not one based on monetary factors, but instead rooted in the need for an actor who embodies the creativity and collaborative spirit of our other talented cast members. The Avengers demands players who thrive working as part of an ensemble, as evidenced by Robert, Chris H, Chris E, Sam, Scarlett, and all of our talented casts. We are looking to announce a name actor who fulfills these requirements, and is passionate about the iconic role in the coming weeks."

The Avengers Mark Ruffalo
Image via Marvel Studios

Norton’s team was none too happy, and issued a rebuttal response claiming the firing was over financial disputes and not about Norton’s creative issues.

RELATED: How the MCU Was Made: 'The Incredible Hulk's Dueling Creative Visions — and Dueling Cuts

In any event, Marvel moved forward without Norton and announced the recasting with Mark Ruffalo at San Diego Comic-Con that summer, when they brought the entire Avengers cast onstage to mark the monumental film to thunderous applause.

Filming on The Avengers got underway in April 2011 in Albuquerque, New Mexico, where the bulk of the production was based. The production later moved to Cleveland, Ohio for four weeks of filming to capture exteriors for the Battle of New York, but Albuquerque served as the base of operations. Although this was before Marvel Studios built their gargantuan production facility in Atlanta, Georgia, which is where most Marvel movies are made nowadays.

As for that intriguing post-credits scene involving Thanos, which first introduced the idea of the supervillain who would eventually put the MCU on a path towards Avengers: Infinity War and Endgame, the idea was all Joss Whedon’s. Marvel’s Kevin Feige simply told Whedon the villains in Marvel’s The Avengers should be aliens, but the rest was up to him:

“I wanted to get cosmic and did with 'Thor' and told [Joss] that we wanted it to be aliens, that a portal opens in New York and aliens poor out, because the cosmic cube opened a portal. Who they were, what they were, and how they interacted was all Joss and Joss is a huge fan of Thanos.”

The Avengers Thanos
Image via Marvel Studios

Whedon chose Thanos because, to him, he’s the most fascinating Marvel villain:

"He for me is the most powerful and fascinating Marvel villain. He’s the great grand daddy of the badasses and he’s in love with death and I just think that’s so cute. For me, the greatest Avengers was 'The Avengers' annual that Jim Starlin did followed by 'The Thing 2 in 1' that contained the death of Adam Warlock. Those were some of the most important texts and I think underrated milestones in Marvel history and Thanos is all over that, so somebody had to be in control and had to be behind Loki’s work and I was like ‘It’s got to be Thanos.’ And they said ‘Okay’ and I’m like ‘Oh my God!’"

Obviously the Thanos we saw in Infinity War and Endgame not only looks different, but has motivations different from what Whedon said back in 2012, but this is a fascinating look inside the Marvel creative process. Introducing Thanos wasn’t part of some massive grand plan in which Marvel already knew they were laying the groundwork towards Infinity War. He’s there simply because Joss Whedon thought it would be cool, and it was up to the folks at Marvel to hash out how and why he fit into the MCU going forward in the ensuing years.

But the second and final post-credits scene in The Avengers—the one in which the characters are all eating shawarma—was shot very late. In fact, the scene was filmed the day after the world premiere of The Avengers, on April 12, 2012, when all the actors were back in the same place again. Whedon captured the footage and edited it into the film in time for its wide release on May 4, 2012, although if you look closely you’ll notice Chris Evans is covering his face because the actor had a beard at the time they shot the scene.

the-avengers-cast-shawarma
Image via Marvel Studios

As for the release of Marvel’s The Avengers, well, it was truly a watershed moment in cinema history, but also marked a first for the MCU. In December 2009, the Walt Disney Company purchased Marvel Studios outright for $4 billion, and though at the time they stated they would let certain deals expire before taking over, in October 2010 they announced their intention to buy the distribution rights to two MCU movies from Paramount Pictures.

Starting with the first Iron Man, Marvel Studios had independently set up a deal in which Paramount Pictures would distribute their first six films (not counting Incredible Hulk, which was distributed by Universal due to rights issues). But after Disney bought Marvel Studios, they decided they wanted to distribute the final two films in that six-movie contract — which just so happened to be Marvel's The Avengers and Iron Man 3So Marvel's The Avengers actually marked the first Marvel Studios movie that was released by Disney, with the full weight and backing of Disney's powerful marketing machine.

Going back to the film's release — at the time, the notion of combining disparate characters from separate movies into a “team-up” movie that would then allow them to split off into separate sequels again afterwards was a new notion to the moviegoing public at large. This was translating comic book storytelling to the big screen, and if it didn’t work, the entire Marvel Cinematic Universe franchise could fall apart. But it did work. And then some.

With $207.4 million on opening weekend, Marvel’s The Avengers shattered the opening weekend record set by Harry Potter and the Deathly Hallows – Part 2 the previous year, which hit $169.2 million. Indeed, it wasn’t just that The Avengers broke records; it obliterated them. It became the fastest movie ever to reach $100 million, $150 million, and $200 million — all on opening weekend alone — and climbed the charts to become the third-highest grossing film of all time worldwide with a total of $1.5 billion.

the-avengers-group-image
Image via Marvel Studios

In addition to box office success, the film was a critical hit as well, scoring mostly positive reviews from critics and incredibly positive responses from audiences. Miraculously, Marvel Studios pulled it off. By laying the groundwork with Iron Man, Iron Man 2, Thor, Captain America: The First Avenger, and even The Incredible Hulk, they built up anticipation for Marvel’s The Avengers, and the team-up movie was the moviegoing event of the year. On top of that, the movie was actually good! Joss Whedon was able to give ample screentime to almost all of the characters (sorry, Hawkeye), creating dramatic tension in nearly every frame, and then essentially rebooting the characters of Hulk and Black Widow to become fan-favorites.

So Marvel’s The Avengers was a success, and with that, Phase One of the Marvel Cinematic Universe came to an end. But that left the MCU with one major lingering question: how do you proceed with standalone films after all your major characters have met? It would be up to Iron Man 3 to work that one out.

This article was originally published in May 2019.

KEEP READING: How the MCU Was Made: 'Captain America: The First Avenger' and Why Chris Evans Initially Turned It Down