Marvel Studios’ interconnected universe of films, now spanning 10 years and 19 individual projects, has earned $6 billion in domestic box office and nearly $15 billion worldwide, according to data from Box Office Mojo.

That ain’t bad considering that in 1996 Marvel mired in bankruptcy, and a decade later banked its nascent film franchise on a second-tier superhero called Iron Man.

“There was a lot of skepticism in the beginning,” Barton Crockett, a media and entertainment analyst at B. Riley FBR, told TheWrap. “Who did these guys think they were trying to make movies out of characters people hadn’t heard of before? Who would want to see a movie about Iron Man? What’s amazed me is the ability to make these tertiary characters popular, and that really started right out the gate.”

Also Read: Marvel President Kevin Feige Explains Origin of MCU's Post-Credit Scenes

“Iron Man,” which helped pull Robert Downey Jr. from the depths of a scandal-ridden career, went on to make $318.4 million domestically and $585.2 million worldwide.

In 1996, Marvel was forced to file for Chapter 11 bankruptcy after the comic book industry started to collapse in the ’90s. After tense legal battles and struggles to pay back creditors, the company was salvaged in 1997 and merged with Isaac Perlmutter’s Toy Biz.

The Israel-born toy manufacturer entrusted his business partner Avi Arad to help dig Marvel out of its slump. Arad wooed bankers and preached the value of Marvel’s characters, according to a 2012 Slate article on the studio’s rise.

Marvel also auctioned off the film rights to some of its most prized characters. Spider-Man went to Sony, the Hulk went to Paramount and 21st Century Fox bought the rights to Daredevil, the X-Men and Fantastic Four.

Also Read: Marvel Cinematic Universe Movies Ranked by Box Office (Photos)

By that time, Marvel Studios no longer had the film rights to its most bankable characters. So Arad & Co. found a “brilliant way to operate out of the licensing box” in which it had placed itself, Crockett said.

The company, with toy sales in its DNA, thought first: What character could sell the most toys? “Mr. Perlmutter didn’t expect to make much money off the movies, but he thought they’d make great advertisements for toys,” Ben Fritz wrote in his book “The Big Picture: The Fight for the Future of Movies.” “The question wasn’t who the kids would want to watch on the big screen, but which action figure would they want to play with. The answer was Iron Man.”

Under Kevin Feige, a young producer promoted to Marvel’s president of production in 2007, the company doubled down on its strategy. The following year, Paramount released “Iron Man” — the first in a series of blockbuster films from source material that few fathomed would find mainstream success.

Also Read: The Complete Timeline of Marvel Cinematic Universe Movies, From 'Iron Man' to 'Infinity War'

“It starts with the comics and us getting to rip pages out, put them on the walls and start to be inspired,” Feige told the press on the eve of Marvel’s latest film, “Avengers: Infinity War.” “It is always a guide point, a North Star for us as we lead these giant productions into reality are right from those books where it all started.”

The success of “Iron Man” caught the eye of Disney, which bought Marvel for $4 billion in 2009. The acquisition gave Marvel the platform and the pocketbook to chase the audacious multi-superhero, multi-film crossover project that’s coming to fruition with “Avengers: Infinity War” and its untitled “Avengers” sequel due next summer.

Perhaps the first real test of whether Marvel could actually pull off a universe films based on virtually unknown comic book characters was 2014’s “The Guardians of the Galaxy” — based on a long-dormant comic that few diehards even remembered.

When Djimon Hounsou’s Korath jokes that he doesn’t know who Star Lord (Chris Pratt) is, the character wasn’t alone. A talking raccoon? A sentient tree? Two oddly colored alien warriors and a half-man, half-celestial captain? Who were these characters that Disney, with a history of capitalizing on established IP, was willing to invest nearly $200 million in?

Also Read: 'Avengers: Infinity War' Reaction: Here's What We Think of Marvel's Latest Installment (Video)

Since that film broke opening weekend records on its way to $773.3 million worldwide, Marvel has been able to make hits out of similarly unlikely characters like Black Panther and Doctor Strange.

“It’s incredible. The whole idea is working,” Crockett said. “We’re approaching a weekend where a Marvel movie might very well have the biggest box office opening of all time, which is stunning when you consider where they came from.”