This year's Avengers: Endgame is poised to conclude the Marvel Cinematic Universe's overarching narrative that has been a decade in the making, but one of the biggest plot holes over the course of the franchise's 20-film history is why Thanos entrusted the Mind Stone to Loki during the events of 2012's The Avengers.

While Thanos was ultimately successful in his bid to recover all six Infinity Stones to power the Infinity Gauntlet, as seen in last year's Avengers: Infinity War, the calculating MCU villain giving away the only Infinity Stone he had obtained at that point seemed like a needlessly reckless and out of character decision, especially considering the Mad Titan was giving it to a figure renowned for trickery and deceit who he had met no more than a year prior.

RELATED: Marvel's Loki Series Taps Rick & Morty Writer as Showrunner

While promoting Infinity War this past April, screenwriters Christopher Markus and Stephen McFeely speculated that Loki's scepter in The Avengers may not have been originally intended by filmmaker Joss Whedon and Marvel Studios President Kevin Feige to be an Infinity Stone. The scepter was retconned to contain the Mind Stone in 2015's Avengers: Age of Ultron. This move introduced another Infinity Stone in a recognizable MCU artifact and explained the scepter's powers of mind control in the first two Avengers films.

The original Avengers film was conceived relatively early in Marvel Studios' efforts to create its own films rather than licensing out properties, with Loki always planned as the central antagonist of the ensemble movie by original screenwriter Zak Penn, which carried over to extensive rewrites by Whedon. Believing Thanos to be a larger villain in the wider Marvel mythos and a bigger threat to be teased for future films, Whedon suggested the Mad Titan to be the true mastermind behind Loki's plot and was surprised to receive Marvel Studios' blessing to include him.

RELATED: REPORT: How Marvel's Loki Series Gets Around His Infinity War Death

With its overarching villain set, Josh Brolin was announced to be voicing and providing motion-capture for Thanos deep into production on Guardians of the Galaxy, while the significance of the Infinity Stones in the MCU was expanded on in a mid-credits scene for Thor: The Dark World. As it became clear that Marvel Studios was taking inspiration from Thanos' most notable appearance in Jim Starlin, George Perez and Ron Lim's The Infinity Gauntlet comic book storyline, fans began to speculate that Loki's scepter housed the Mind Stone, allowing him to control individuals like Hawkeye and Doctor Selvig.

This speculation would be confirmed in Age of Ultron, with the titular robotic villain using the Infinity Stone to activate Vision. It was also revealed that Hydra has used the stones to give superpowers to Scarlet Witch and Quicksilver through genetic experimentation, which was first teased in the mid-credits scene for Captain America: The Winter Soldier.

NEXT PAGE: Thanos Decides to Get His Hands Dirty

A frustrated Thanos then resolved to stop working through his proxies to power the Infinity Gauntlet after Loki lost the Mind Stone on Earth in a failed effort to recover the Space Stone. The Mad Titan's decision to get his hands dirty was cemented when Ronan the Accuser stole the Power Stone for himself in the original Guardians of the Galaxy.

RELATED: Endgame Merchandise Confirms Avengers' New Costumes, Reveals Official Name

Thanos continued to trust his Black Order to help him recover the Infinity Stones as part of his ongoing mission, but the Mad Titan himself would play a much more hands-on role in their recovery, actively participating in the attacks on the Asgardian survivors to acquire the Space Stone, thrashing the Collector's archives on Knowhere to claim the Reality Stone and venturing to Vormir with Gamora to obtain the Soul Stone.

At the end of Infinity War, Thanos faced the heroes gathered on Titan alone to take the Time Stone from Doctor Strange and, following the annihilation of the Black Order, snatched back the Mind Stone from Vision. What was formerly the first and only Infinity Stone in Thanos' possession years earlier became the final stone the villain obtained.

Thanos Josh Brolin

The retcon of Loki's scepter housing the Mind Stone is one of the most blatant and convenient retcons in the history of the MCU, on par with Hela offhandedly dismissing the Infinity Gauntlet in Odin's armory as a fake in Thor: Ragnarok. In-universe, it could be attributed to an early tactical error by Thanos, who underestimated the heroes of Earth and dismissed the possibility that they would ever effectively work together.

Loki would pay the ultimate price for his earlier failure at the hands of Thanos (literally), and the idea that the villain would ever part ways with an Infinity Stone before the completion of his plan is one that has never been addressed again.

Directed by Joe and Anthony Russo, Avengers: Endgame stars Robert Downey Jr., Josh Brolin, Mark Ruffalo, Tom Hiddleston, Chris Evans, Chris Hemsworth, Jeremy Renner, Chris Pratt, Elizabeth Olsen, Chadwick Boseman, Sebastian Stan, Benedict Cumberbatch, Paul Bettany, Samuel L. Jackson, Cobie Smulders, Benedict Wong, Zoe Saldana, Karen Gillan, Vin Diesel, Dave Bautista, Pom Klementieff, Scarlett Johansson, Tom Holland and Anthony Mackie. The film arrives on April 26.