The Marvel Cinematic Universe is as old as a fourth-grader and has made more than $14 billion worldwide.

It is a behemoth, the work of countless people behind and in front of the camera, based on the countless pages of comic books funded by sticky nickels and leftover allowances.

When people talk about the Marvel Cinematic Universe, they’re not only referring to the 18 movies Marvel has produced over the past 10 years, but also the shared place where all these fictional characters exist. If a Wasp flaps its wings in one movie, its effect is felt in Marvel’s other films. With the MCU, Marvel has created a 10-year continuous filmic narrative for dozens of characters — a cinematic rarity.

Avengers: Infinity War is an inflection point in that narrative, both the 10-year anniversary of Earth’s favorite superheroes and a monumental battle without any guarantees that anyone in this epic universe is safe.

As Infinity War looms — with record-breaking ticket sales — it’s as good a time as any to look back at how exactly Marvel built this cinematic juggernaut, look ahead to its future, and remember how it never would have existed had Marvel not fallen into bankruptcy.

How bankruptcy dictated Marvel’s future

To fully understand Marvel’s cinematic success story, it’s important to understand where it started.

Back in the ’90s, Marvel was hemorrhaging money. In an effort to stave off bankruptcy, it sold off the film rights to its most popular comic book characters: the X-Men to Fox and Spider-Man to Sony. Marvel’s financial decision was the reason Spider-Man wasn’t part of the Marvel Cinematic Universe until 2017’s Spiderman: Homecoming, and why the X-Men won’t be (at least until Disney’s acquisition of Fox goes through).

Fox and Sony got on the modern superhero movie bandwagon first with 2000’s X-Men and 2002’s Spider-Man, which were both massive financial successes and would subsequently turn into trilogies. X-Men and Spider-Man proved that the interest in superhero movies was there, but the challenge facing Marvel was that the heroes whose film rights it didn’t sell off had much smaller fan bases than the X-Men or Spider-Man (at least back in 2000).

What Marvel did have was the charismatic egomaniac Tony Stark and plenty of trust in Robert Downey Jr., who reportedly beat out Sam Rockwell, Timothy Olyphant, and Clive Owen for the role. Downey had been arrested in 2001 and admitted to battling an addiction to drugs and alcohol. In the mid-2000s, he began making his comeback in mainstream movies. While you could make an argument that his portrayal of Harry Lockhart in 2005’s Kiss Kiss Bang Bang might be the best performance of his career, there’s no doubt that his portrayal of Tony Stark, first seen in 2008’s Iron Man, has been his most successful.

As a character, Iron Man did not have the same name recognition as the X-Men or Spider-Man and was nowhere close to DC Comics’ trinity of Superman, Wonder Woman, and Batman. But the perfect fit of Downey as Tony Stark was immediately apparent: While Spider-Man and the X-Men have been rebooted with new actors, the former multiple times, Downey has always been Marvel’s Tony Stark. The same can be said for fellow Avengers actors like Chris Evans, Chris Hemsworth, and Scarlett Johansson, who have played their characters throughout the 10-year span.

Downey gave Stark the arrogant, effortless charisma the character needed to make the jump from page to screen, and was a breath of fresh air compared with the very serious X-Men and Christopher Nolan’s dark take on Batman. Iron Man was a hit, grossing $318 million domestically and $624 million worldwide.

If the first Iron Man movie had bombed, we would never have had The Avengers and, ultimately, Infinity War. But more importantly, if Marvel had never signed away the rights to Spider-Man and the X-Men, it never would have been forced to gamble on a superhero viewers didn’t know they wanted yet.

Marvel lifted its cinematic strategy straight from its comic book origins

Marvel’s biggest contribution to the modern movie landscape has been making movies that function on their own but also help build a universe with its own narrative, a narrative that extends to both characters and themes.

One example is Tony Stark’s evolving moral compass and his self-assigned duty to protect the world: You can see it come to life in the first Iron Man, then slowly evolve to the point where it becomes a liability in Age of Ultron, and then a moral fissure between him and Captain America in Captain America: Civil War. Or it could be an evolution as simple as Tom Holland’s Spider-Man being introduced in Civil War and then getting rounded out as a character in the subsequent Spider-Man: Homecoming.

The interconnected universe approach is what allowed the Hulk to disappear from the Marvel Universe after the events in Age of Ultron and not appear in another movie or in the universe again until he’s found in Thor: Ragnarok. And, of course, there are those Infinity Stones, which are peppered, some more discreetly than others, throughout those 18 movies.

The word that comes to mind is continuity, a strategy that reflects what Marvel godfather Stan Lee did in his comic books. As Sean Howe wrote in Marvel Comics: The Untold Story, Lee and his fellow writers, editors, and artists would create individual stories in specific issues but would also tinker with the overarching narrative, keeping in mind what happens in those issues.

“[Lee] vigilantly kept a consistent continuity between all the titles, so that, for instance, when the Hulk was captured in Tales to Astonish, Reed Richards wondered about his whereabouts in a Fantastic Four Annual,” writes Howe.

Marvel’s comic books still operate in the same way today.

This idea of a continuous narrative isn’t the only concept Marvel Studios borrowed from its comic books. With Avengers, Avengers: Age of Ultron, and Infinity War, Marvel Studios has brought the comic book crossover — collecting all their heroes in one special issue or event — to the silver screen.

The foundation for a crossover was laid early. The MCU’s first solo superhero films — Iron Man, Thor, and Captain America: The First Avenger — primarily functioned as introductory origin stories. But they were also loosely connected by Iron Man’s “Avengers Initiative” post-credits scene:

In that scene, Nick Fury (Samuel L. Jackson) tells Tony Stark that there are other superpowered individuals and that he (Fury) is working on tracking them. Of course, the cherry bomb in this scene is that anyone familiar with Marvel knows the Avengers are a superhero team, meaning this first MCU post-credits scene was playing a long game, foreshadowing the team-up we’d see four years later in The Avengers.

By now, Marvel’s cinematic strategy is well-known and well-proven, but at the time, it was starkly different than that of its superhero movie peers. The X-Men, with the exception of Wolverine, have always functioned more as a unit than individuals, and none save Wolverine had solo movies. Meanwhile, the superpowered individuals who kept popping up in Spider-Man’s universe were villains; Spider-Man himself operated alone and wasn’t part of a bigger team.

Though Marvel didn’t have the film rights to the X-Men and Spider-Man, it did have the Avengers, and it smartly used its movies to showcase its heroes.

The prosperity of Marvel’s box office has gotten to the point where it helped shape, inspire, and promote the comic books — the source material that all these movies are based on. Heroes like Scarlet Witch (in 2015), Black Widow (in 2016), and Vision (in 2015) have all gotten their own solo comics after their status was raised by their respective movie introductions. And in anticipation of Infinity War, Thanos received his own comic book in 2016 that has run through this year.

Even though Marvel’s model has proven successful — while not entirely avoiding criticism that so many of its movies are the same — it hasn’t been replicated successfully. Warner Bros., which boasts the rights to DC’s Justice League, tried its own version of the Marvel Cinematic Universe by introducing heroes beyond Batman and Superman in Batman v Superman: Dawn of Justice. But instead of giving its superheroes their own individual movies and stories, the studio opted to give us BvS first, then Suicide Squad, then Wonder Woman, and then finally the Avengers-like team-up Justice League.

With the exception of Wonder Woman, all of those films struggled to achieve the combination of warm reviews and big box office that’s greeted most MCU movies; Justice League has the dubious distinction of being the highest-grossing “flop” ever. The studio’s cinematic universe is struggling for the moment — proving just how hard it is to nail Marvel’s winning formula.

Marvel’s storytelling has evolved to become more self-aware

When Marvel Studios president Kevin Feige talks about Marvel’s movies, he’s referred to them as parts of phases — one, two, and three. Infinity War, at the 10-year mark, is the seventh movie in phase three.

Looking at these movies in phases, it’s evident that the storytelling has evolved. Marvel began shifting its focus from origin stories (Iron Man, Thor, Captain America: The First Avenger) to more personal ones (Iron Man 3, Captain America: Winter Soldier, Avengers: Age of Ultron) in the first two phases.

A lot of that is just the result of storytelling within a world that Marvel’s movies have already established; it’s easier to take risks when you’re playing with Marvel’s house money. Further, many of the comic books these movies borrow from are political and have been political since their creation.

But the shift also stems from audiences and critics searching for deeper meaning in superhero films. The “superhero saves the day” story can’t be repeated the same way for 10 years.

The clearest example of this is the evolution from 2012’s The Avengers to 2015’s Avengers: Age of Ultron to 2016’s Captain America: Civil War.

In the first Avengers movie, Earth’s Mightiest Heroes defend the city at any cost, wrecking buildings and presumably endangering New Yorkers to hold off the Chitauri invasion. Age of Ultron examines the repercussions of superheroism and how Tony Stark’s obsession with protecting people — by way of a genocidal sentient AI — ultimately endangers regular civilians even more; Scarlet Witch and Quicksilver start out as villains whose main motivation is getting revenge on Tony Stark and Stark Industries for ruining their country and killing their family. And Civil War is a story about government regulation and independence woven into a bigger story featuring a villain who wants to take revenge on the Avengers for ruining his life.

Marvel’s early movies dazzled us with the stories of great power. By phase three, its movies aren’t just reinforming us that with great power comes great responsibility, but also asking if great responsibility alone is enough to contain great power.

The future of the Marvel Cinematic Universe is going to need new leaders

Black Panther is the last movie that Marvel produced before Infinity War and was its most successful in recent memory. Director Ryan Coogler’s film has made $1.3 billion worldwide and $675 million domestically, making it Marvel’s most successful movie on American soil. Its success has been so massive that it’s now impossible to imagine a Marvel Cinematic Universe without Wakanda and T’Challa.

Related Black Panther just keeps smashing box office records

Getting Black Panther to the screen was a different story.

Black Panther was the first nonwhite superhero to get his own movie in Marvel Cinematic Universe history, which began with Iron Man in 2008. Nonwhite characters existed in the MCU but mostly as sidekicks or under prosthetics and makeup. Black Panther and its hero represented a superhero fantasy that Marvel, and cinema in general, has had little time for.

That Black Panther was so successful and has a story that unapologetically deals with themes like racial inequality, colonization, prejudice, and pride is a glimpse of what Marvel Studios can do with the power it has. Black Panther is life-affirming for fans who have been waiting for representation — and possibly life-changing for kids lucky enough to see themselves in Black Panther and Wakanda.

Black Panther also might be a preview of Marvel’s future.

In 2019, around a year from now, Brie Larson will take up the mantle of Captain Marvel, a.k.a. Carol Danvers, a photon-wielding, Air Force-trained space captain who, in the comic books, is also one of the Avengers’ leaders. Captain Marvel will be the first female superhero in Marvel’s Cinematic Universe to get her own movie. With the success of Black Panther and 2016’s Wonder Woman — the first of DC Comics’ female superheroes to get her own movie — there’s no reason Captain Marvel can’t be a success on par with those two films.

And with Carol Danvers having led the Avengers in the comic books, it’s not out of line to think she could end up commanding the next iteration of Earth’s Mightiest Heroes on the silver screen.

Robert Downey Jr. isn’t getting younger, and Scarlett Johansson, Chris Evans, and Chris Hemsworth have been playing their characters for about seven or eight years in a plethora of movies. Meanwhile, characters like Black Panther, Doctor Strange, Spider-Man, and Captain Marvel are just getting their start in the Marvel Cinematic Universe. After Captain Marvel hits theaters, the next Avengers movie (still untitled, and due out in May 2019) follows and marks the end of phase three and the beginning of phase four — a clear opportunity to pass the torch.

When Marvel Studios began its cinematic universe a decade ago, Iron Man was a bold gamble on a hero and character. I’d wager that no one, not even the most optimistic Marvel executives, could have foreseen Iron Man as the foundation for 10 years of movies, 2,200 minutes of film, and such a long, complex continuous narrative on the silver screen.

At this point, passing leadership and the responsibility of the franchise to new heroes and the actors who play them sounds potentially blasphemous. But it’s not like Marvel hasn’t done this before.