EDITOR'S NOTE: This article is part of a series, "Countdown to Endgame," which looks back at the films of the Marvel Cinematic Universe leading up to Avengers: Endgame.

With all its main players introduced across 18 films, released over the course of a decade with minimal recasting, Marvel Studios was finally ready to deliver on the promise it had made ever since the Tesseract was first glimpsed in Howard Stark's notebook in Iron Man 2.

Thanos, first silently revealed in the mid-credits scene for The Avengers, was now no longer the stern intergalactic despot operating from the shadows, as seen in Guardians of the Galaxy and Avengers: Age of Ultron. Instead, he was right in the center of the Marvel Cinematic Universe.

Five of the six Infinity Stones had been introduced: the Space Stone in Thor, the Mind Stone in The Avengers, the Reality Stone in Thor: The Dark World, the Power Stone in Guardians of the Galaxy and the Time Stone in Doctor Strange.

Thanos and his minions were revealed to be actively hunting for them all, which spelled trouble for the Avengers. Captain America and his allies were still on the run and Asgard had been utterly destroyed. Earth's Mightiest Heroes were divided and at their lowest points when they needed to be together the most.

RELATED: Countdown to Endgame: The Biggest Risks in the MCU

Avengers: Infinity War would bring all these seemingly disparate elements of the MCU together, packed with instant fan-favorite moments. The film teamed up the Avengers with Doctor Strange and the Guardians of the Galaxy, paying off a decade of cinematic storytelling.

Originally dubbed Avengers: Infinity War Part 1, with its then-untitled sequel penned as Infinity War Part 2 when both films were officially announced in 2014, Marvel amended the subtitle to avoid the impression that the two films were a single story split in two.

Written during filming of Captain America: Civil War, screenwriters Stephen Markus and Chris McFeely, along with the Joe and Anthony Russo, would meet with other Phase Three directors on almost a weekly basis to help organically build to the eventual ensemble film.

Doctor Strange filmmaker Scott Derrickson provided advice on the depiction of the Sorcerer Supreme, James Gunn helped with jokes and soundtrack choices for the Guardians and Taika Waititi made sure the new approach to Thor would carry over naturally into Infinity War.

Thor in Avengers: Infinity War

Taking place immediately after the events of Thor: Ragnarok, Thanos launches an all-out assault to recover all six Infinity Stones, including the mysterious Soul Stone, to fully power his Infinity Gauntlet and wipe out half of all life in the universe.

Still fractured, the Avengers are further divided when Iron Man, Spider-Man and Doctor Strange are whisked off to Thanos' home world of Titan. Captain America and Black Panther lead a desperate defense on Earth while Thor vows revenge for the death of his brother and fellow Asgardians.

With this in mind, Infinity War is mainly told from Thanos' perspective as the Mad Titan undergoes his own epic journey to achieve his genocidal goal. Audiences worldwide were stunned by the film's shocking, cliffhanger ending, going on to become the first summer blockbuster to earn over $2 billion at the box office.

RELATED: Countdown to Endgame: The Foundation of the MCU

In sharp contrast to Infinity War was Ant-Man and the Wasp, released three months later. A direct continuation to the 2015 original film and Scott Lang's last appearance in Civil War, the new MCU film has Ant-Man under house arrest and monitored by the FBI after he sided with Captain America. Evangeline Lilly's Wasp is on the run with her father after their technology was tied to the Civil War conflict.

NEXT PAGE: Captain Marvel Goes Higher, Further, Faster

For returning director Peyton Reed, it was an opportunity to build an MCU film from scratch instead of following cues from filmmaker Edgar Wright, who was once slated to helm Ant-Man's debut film.

Ant-Man and the Wasp

Whereas Ant-Man had been structured like a heist film, its sequel would unfold more like a rescue mission on the run, with most of the main cast from the first film returning. Lilly and Michael Douglas enjoyed larger roles in the sequel.

Joining them was Michelle Pfeiffer as the original Wasp, a dream casting choice from Reed and Lilly, along with Laurence Fishburne, Hannah John-Kamen and Walton Goggins.

Lang uses his telepathic connection to Janet Van Dyne from his time in the Quantum Realm to mount a rescue as he, Hope Van Dyne and Hank Pym are pursued by the FBI and several new villains.

A solid success critically and commercially, Ant-Man and the Wasp ended with a mid-credits scene tying directly into Infinity War and the promise that Scott Lang and the Quantum Realm would play a prominent role in Avengers: Endgame.

RELATED: A Complete Marvel Cinematic Universe Timeline, Across Film & TV

In moving forward to its final film before Endgame, Marvel Studios actually went back to the past by primarily setting Captain Marvel in 1995. In development since 2013, the character was originally slated to appear at the end of Age of Ultron before Marvel Studios President Kevin Feige decided the superhero was best suited for her MCU debut in her own solo film.

With five credited screenwriters, including directors Anna Boden and Ryan Fleck, development on the film was particularly long, the film having been delayed several times to ensure the story was up to par. As a result, Captain Marvel moved from its planned July 2018 release date to March 2019.

Captain Marvel

Starring Academy Award winner Brie Larson in the title role, the film was set in 1995, as it was a decade largely unexplored by the MCU at that point. At Larson's request, Samuel L. Jackson would figure prominently as a younger Nick Fury after working with Larson on Kong: Skull Island.

The film followed former Air Force pilot Carol Danvers learning of her forgotten past on Earth and discovering the true nature of the Kree-Skrull War that she had fought in for years. The film ends with Carol claiming the mantle of the most powerful superhero in the MCU so far.

Because of production schedules, Larson actually filmed her role for Endgame before Captain Marvel, though Boden and Fleck were on set during Carol's scenes to help stay consistent with her portrayal in their film. Despite a targeted campaign by online trolls, Captain Marvel would earn over $1 billion at the worldwide box office and go on to garner critical acclaim.

RELATED: The Russo Brothers Reveal the First MCU Scene They Shot

In Infinity War, the Russos had created one of the most instantly iconic cliffhangers in the history of cinema. The stakes for the heroes of the MCU were now undeniably the highest they had ever been, and not even the most beloved characters were safe.

With Ant-Man and Captain Marvel now guaranteed to play major roles in Endgame, and the Quantum Realm teased to appear prominently in the upcoming film, Marvel Studios had set the board for the finale to the Infinity Saga.