One of the earliest fan-favorite moments in the Marvel Cinematic Universe was an 11th-hour addition, delivered with the sweet flavor of deadline desperation.

The climax of Jon Favreau's 2008 door-buster "Iron Man," based on the Marvel comics of the same name, entails weapons manufacturer Tony Stark (Robert Downey, Jr.) going toe-to-toe with former mentor and business partner Obadiah Stane (Jeff Bridges). Following an attempted coup in which Stane hired The Ten Rings to assassinate the Stark Industries CEO, Stane, now the Iron Monger, had an exosuit built to outperform Stark's Iron Man suit in every way — except for one. In a dazzling CGI sequence, the two engage in a mid-air battle for supremacy, arc reactor against arc reactor, in an ingenious show of brains over brawn. Picking up on loose trivia left earlier in the narrative, Stark intentionally instructs his suit's A.I., J.A.R.V.I.S. (voiced by Paul Bettany), to ascend to the maximum altitude, knowing that 1) Stane would predictably give chase, and 2) the thinning atmosphere creates frost which affects the suit's functionality. He did, and it did. The "gotcha" moment led to a hard-won victory, a blown-out Stark Industries, and launched Phase One of the MCU.

Turns out, the sky rumble was never in the script. In the book "The Story of Marvel Studios: The Making of the Marvel Cinematic Universe," authors Tara Bennett and Paul Terry sit down with integral players in the MCU evolution, including "Iron Man" associate producer Jeremy Latcham and the film's editor, Dan Lebental, who frantically endeavored to make the most out of a dwindling post-production window. Read on to find out how they pulled it off.

"How'd You Solve The Icing Problem?"

With little time left to salvage the unsatisfying final fight, and with Industrial Light & Magic pressuring them to pick one of three pre-visual effects scenes to commit to, it was time to gather what they had so far and call a lifeline. The book gives the play-by-play:

Latcham made a DVD rough cut of their current edit. He slung it into his backpack and raced to the Santa Barbara Film Festival, where two of Iron Man's writers, Mark Fergusand Hawk Ostby, where in attendance as members of the festival jury. Arriving in a blur at Fergus and Ostby's room, Latcham loaded the DVD and played the cut on their hotel TV screen. It took the writers one viewing before they both said: "The Icing Problem." Latcham gave them a confused look, so they quickly laid it out: Tony Stark's high-altitude icing problem with the Mark 2 suit is explained during the test flight. But then, it never amounts to anything. So, at the very end, when Stark and Obadiah are up in the sky, Stark knows his foe is going to have the same icing problem, which is why he lures Obadiah up so high. "And that is why you're writers!" exclaimed Latcham before he raced back to Favreau and Lebental. In what Latcham describes as a "total madhouse," those hugely important CGI shots didn't get finished until just three weeks before the movie was released.

Stars: they're trying their best, just like the rest of us!

The trip to Santa Barbara was a smart one; the final fight of "Iron Man" brings the story to a stellar peak of crunching metal and warring egos. In fact, it's hard to imagine Favreau's superhero picture getting two Oscar nominations for Best Sound Editing and Best Visual Effects without the scene. "The Story of Marvel" isn't just an oral history of the studio's most popular blockbusters; it's a comprehensive confirmation of the sheer number of plates the players on the Marvel Studios stage have been spinning, and continue to spin, to craft an interconnected cinematic universe that honors its source material and pulls in serious box office dollars.

Read this next: Every MCU Post-Credits Sequence Ranked From Worst To Best

The post The Ending of Iron Man Was a Last Minute Fix That Wasn't Completed Until Three Weeks Before Release appeared first on /Film.