Getting to Marvel’s The Avengers was a miraculous achievement in and of itself, but the Marvel Cinematic Universe couldn’t stop there. Indeed, it was only the beginning of over-arching plans that would lead to even bigger battles, higher stakes, and tragic ends. But before getting to the epic scope of something like Avengers: Endgame, Marvel Studios had to convince general audiences that just because The Avengers happened and these disparate characters came together to defeat a common enemy didn’t mean the individual standalone movies couldn’t still have compelling and interesting stakes all their own. Luckily, that job would fall to the most popular hero of the bunch, Iron Man, in a sequel that surprised audiences in ways few could have foreseen. This is how Iron Man 3 was made.

While Jon Favreau directed Iron Man and Iron Man 2, he stated publicly that he wouldn’t return to helm Iron Man 3 — although he remained involved as an executive producer. Creative tensions with Marvel executives on Iron Man 2 led to Favreau being dropped out of the running to direct Marvel’s The Avengers (which he really wanted to do), and the filmmaker moved on to Cowboys & Aliens and Disney’s Magic Kingdom, which never came to fruition.

RELATED: How the MCU Was Made: 'Iron Man 2' — Contract Troubles, Recasting, and Creative Disputes

When the hunt was on for a new director, star Robert Downey Jr. had a heavy hand in doing the choosing as he was not only the face of the franchise, but also a serious creative contributor having helped improvise much of the first Iron Man movie. In deciding who would helm Iron Man 3, Downey Jr. reached out to the filmmaker who not only helped launch his own career resurgence with Kiss Kiss Bang Bang (which also put him on Marvel’s radar), but also provided uncredited script advice and work on the first two Iron Man movies: Shane Black.

shane-black-robert-downey-jr-iron-man-3
Image via Marvel.

Black burst on the Hollywood scene as a wunderkind screenwriter of films like Lethal Weapon and The Long Kiss Goodnight, and he made the successful transition to director with the excellent 2005 noir Kiss Kiss Bang Bang, which starred Downey. He signed on to write and direct Iron Man 3 in February 2011, and that March, Marvel hired Drew Pearce (Hotel Artemis) to co-write the screenplay alongside Black.

While Black was initially reluctant to work with a co-writer he didn’t know, he quickly came to embrace Pearce’s company and the two set about pulling from the Extremis comics run to craft a story involving one of Iron Man’s most iconic villains: The Mandarin. This character was originally considered for the first Iron Man movie, but the team couldn’t figure out exactly how to avoid the racial stereotypes of the character from the comics, and thus Obadiah Stane was promoted to chief villain for that initial outing.

With Iron Man 3, Black and Pearce initially planned on adapting The Mandarin in a pretty straightforward manner, and Black said they weren’t told the villain had to be The Mandarin by the higher ups at Marvel:

“Marvel was very gracious, actually. They didn’t know who the villain was. They had kind of expressed a desire that it be The Mandarin at some point, but they were willing to let it not be The Mandarin. They wanted it to be about sort of the destruction of Tony Stark, and the one scene I remember being given on Day One was his entire house and his entire laboratory are sort of decimated and taken out from under him.”

iron-man-3-ben-kingsley
Image via Marvel Studios

The theme of getting Tony “back to the cave” either metaphorically or physically was a recurring refrain when it came to Iron Man 3, and indeed the sequel strips Tony of his fancy toys for its second act and hones the story in on an intimate PTSD tale that’s reminiscent of the first act of the first Iron Man.

As for the Big Bad, when Black and Pearce got to working on the screenplay, Pearce one day suggested making The Mandarin a front for a true villain pulling the strings, and Black responded positively. The two took the pitch into Marvel, thinking they were about to be fired, but were surprised to find Kevin Feige and Co. actually liked the twist. Black would go on to say that hitting upon this twist made more thematic sense than crafting a straightforward adaptation of the Mandarin character:

“I would say that we struggled to find a way to present a mythic terrorist that had something about him that registered after the movie’s over as having been a unique take, or a clever idea, or a way to say something of use. And what was of use about the Mandarin’s portrayal in this movie, to me, is that it offers up a way that you can sort of show how people are complicit in being frightened. They buy into things in the way that the audience for this movie buys into it. I think that’s a message that’s more interesting for the modern world, because I think there’s a lot of fear that’s generated toward very available and obvious targets, which could perhaps be directed more intelligently at what’s behind them.”

Years later, speaking after some fans responded negatively to this plot development, Black still defended the turn as more interesting than a traditional villain story:

“We may have done our job a bit too well in a way because we succeeded in actually having a surprise in the middle of a big summer movie where you normally know virtually everything about it before you go in. And when I say we did our job too well it meant some of the fans felt fooled. They felt I think that they'd been led down one path and then sold a bill of goods. It's hard. Because I want to please the fans... But in this case I thought - and we all thought - that it was just a very interesting and very layered decision to take the Mandarin [in].”

guy-pearce-iron-man-3
Image via Marvel Studios

But whereas The Mandarin twist was all well and good with Marvel, the true villain story was a point of contention with the higher ups. In the final version of the movie, it’s revealed that Aldrich Killian (Guy Pearce) is the real villain behind The Mandarin. But in Black and Pearce’s original screenplay, Killian was more of a minor character and Maya Hansen (Rebecca Hall) was supposed to be revealed as the head honcho. As it turns out, to Marvel Entertainment CEO Ike Perlmutter, this was unacceptable:

“There was an early draft of Iron Man 3 where we had an inkling of a problem. Which is that we had a female character who was the villain in the draft. We had finished the script and we were given a no-holds-barred memo saying that cannot stand and we’ve changed our minds because, after consulting, we’ve decided that toy won’t sell as well if it’s a female… So, we had to change the entire script because of toy making. Now, that’s not Feige. That’s Marvel corporate, but now you don’t have that problem anymore.”

RELATED: Rebecca Hall Reveals New Details About Her Original 'Iron Man 3' Character

Indeed, Feige eventually successfully lobbied to no longer have to report to Perlmutter, who was notoriously meddlesome with terrible ideas like the above, and now reports directly to Disney’s Alan Horn. But at the time, Perlmutter was Feige’s boss, and the mandate was that Hall’s character was not allowed to be the film’s villain. So it was changed to Killian:

“New York called and said, ‘That’s money out of our bank.’ In the earlier draft, the woman was essentially Killian – and they didn’t want a female Killian, they wanted a male Killian. I liked the idea, like Remington Steele, you think it’s the man but at the end, the woman has been running the whole show. They just said, ‘no way.’”

iron-man-3-rebecca-hall
Image via Marvel Studios

Jessica Chastain was originally in negotiations for the part, likely when it was the true villain role, and Hall said her character continued to change throughout filming:

“She wasn’t entirely the villain — there have been several phases of this — but I signed on to do something very different to what I ended up doing. Halfway through shooting they were basically like, ‘What would you think if you just got shot out of nowhere?’ I was meant to be in the movie until the end… I grappled with them for awhile and then I said, ‘Well, you have to give me a decent death scene and you have to give me one more scene with Iron Man,’ which Robert Downey Jr. supported me on.”

As filming got underway in May 2012 in North Carolina (where the production was based), the film continued to go through some changes, and while Black has nothing but praise for his relationship with Marvel and Feige, he described Iron Man 3 as a tough shoot:

“We had troubles. Memories are short. You can go through hell together, then six months later go, “That was kind of fun, wasn’t it, John?” The good news is, Downey and I seem to get on pretty well. We’ll bicker now and again, but to me just having him on board elevates the material. So, the toughness was in the logistics instead of the relationships. That’s the good news. We replaced a lot of things. The plot went this way and that way. Stéphanie Szostak’s character was bigger at one point and we reduced it. Rebecca Hall’s character was bigger at one point and we reduced it.”

iron-man-3-robert-downey-jr
Image via Marvel

One of the biggest changes that was made had to do with the fate of Ben Kingsley’s Trevor Slattery, the failed actor who was serving as the front for The Mandarin. As shot, Slattery showed up during the finale and died spectacularly. Pearce said the moment turned out to be a little too silly in the final edit:

“One of the versions of the movie that was shot, Trevor does indeed [die]. What happens in the version of the movie that was shot is that I think one of the reasons we got away with, let’s face it, quite a few drug references to Trevor in Iron Man 3 is because that’s actually a plot point.  Trevor has stolen one of the Extremis injectors, basically comes out onto the oil rig, and says ‘You tried to lock me in the cupboard, you incandescent nobs,’ and jabs himself, and then promptly blows up. It was, quite frankly, the most Monty Python of all of the beats we had in Iron Man 3.  And it’s a testament again to how much latitude Kevin gave Shane and I in the script.  But what we ended up with was much, much better than that version.”

On top of plot changes, Downey suffered an injury on set that required him to take a break for six weeks. Since the film couldn’t shut down for that length of time, the production not only shot scenes not involving Downey’s character, but actually built a fully digital double of Downey for certain scenes that didn’t involve close-ups or dialogue:

 "We were able to reconstruct [Robert Downey, Jr.] as Tony Stark on set, with the help of [a] body double and the facial captures we’d collected afterwards."

Iron Man 3 hit theaters on May 3, 2013 and was a massive box office success, scoring $174.1 million opening weekend to land the second-biggest opening weekend of all time behind Marvel’s The Avengers. It went on to gross $1.215 billion, making it the second Marvel movie to cross $1 billion but certainly not the last. Indeed, if Marvel’s The Avengers was the successful experiment, Iron Man 3 was the new normal, proving that audiences would indeed return for Marvel standalone movies following the big team-up film.

iron-man-3-robert-downey-jr-don-cheadle
Image via Marvel Studios

Fan reaction to Iron Man 3 was strongly negative in some circles, with comics devotees unhappy with the significant changes made to The Mandarin character, although critics largely praised the film and Black’s knack for subverting expectations. And while the movie was a huge box office success, Marvel was clearly rattled enough by The Mandarin reaction to create a short film that basically apologizes for and undoes The Mandarin twist. The Marvel One-Shot All Hail the King finds Kingsley reprising his role as Trevor Slattery, with the “reveal” that there is still a true Mandarin out there after all.

There was considerable discussion in the wake of Iron Man 3 over whether Downey would make an Iron Man 4, as Iron Man 3 marked the completion of Downey’s Marvel contract. On May 7, 2013 — mere days after the successful opening of Iron Man 3 — Downey entered negotiations to return for Avengers 2 and 3, but did not make a deal for Iron Man 4. As we know now, Iron Man 3 served as the final standalone film for Downey’s Tony Stark, although he would reprise his role as a supporting character in three more Avengers movies, Spider-Man: Homecoming, and Captain America: Civil War.

Looking back, the final moments of Iron Man 3 are certainly satisfying in some ways as a conclusion to Tony’s arc across those first three Iron Man movies. While his character would continue to change and evolve in subsequent team-up films, Iron Man 3 puts a nice bow on Tony’s growth across that initial trilogy. But Marvel’s next film up would not be so successful in showcasing character growth and development. Next week, we dig into the making of Thor: The Dark World.

This article was originally published on June 9, 2019.

If you missed my previous How the MCU Was Made articles, click the links below:

KEEP READING: How the MCU Was Made: 'Marvel's The Avengers' — Recasting Hulk and How That Thanos Scene Happened