Loki's ending was heavily inspired by classic science-fiction, chiefly Planet of the Apes and The Twilight Zoneaccording to one of the show's writers. The Twilight Zone was renown for its bizarre premises that often ended on somewhat downbeat endings that left the audience thinking about the ethical and moral questions raised in the episode they had just watched. Likewise, Planet of the Apes contains one of the greatest and most well-known twist endings, with Charlton Heston's George Taylor discovering the ruins of the Statue of Liberty, and revealing that the alien world he had landed on was in fact Earth in the future.

In a similar fashion, Loki's season finale "For All Time. Always," saw Tom Hiddleston's titular God of Mischief and his female variant, Sylvie (Sophie Di Martino), confront Jonathan Majors' enigmatic He Who Remains, aka Nathaniel Richards/Kang the Conqueror in his citadel at the end of time. There, he presented the pair with a Faustian bargain of epic proportions, and an almost impossible decision that would fundamentally shake the multiverse to its core: return to the Time Variance Authority as its leaders and continue protecting the Sacred Timeline, or kill him, thereby freeing the timeline from his control but unleashing chaos. Sylvie chose the latter, but just before killing He Who Remains, she banished Loki back to the TVA where he desperately sought out Owen Wilson's Mobius only for him to not recognize Loki, and reveal that he had been sent to a branched reality where he never joined the TVA.  The closing moments saw Loki staring in disbelief at a statue of He Who Remains in the TVA and left a lot unanswered questions going into season 2.

Related: Loki's MCU Future: Everything We Know About Hiddleston In Phase 4

In what he dubbed "Loki Midnight Theater," writer and producer Eric Martin took to Twitter to discuss the final episode of the series. During the thread, he revealed a great deal of information about the finale, including what he would have changed if he had more time. Most interestingly, Martin claims that he and showrunner Michael Waldron toyed with several different endings but this one "just felt right." He also revealed that the ending was greatly inspired by old science fiction stories. See Martin's tweet below:

 

Martin's thread was also filled with praise for Jonathan Majors, who in many ways carried the episode. Knowing that the final confrontation would boil down to a conversation, the writers knew they "needed someone with intense charisma." The nature of this climax is suitably fitting with the inspirations behind Loki's ending, especially The Twilight Zone, which would often use its episodes as vehicles for social commentary through long conversations. Martin's statement should then come as no surprise to anyone familiar with either of the influences mentioned, as Loki has very much worn these influences on its sleeve.

That said, it's good to see a writer acknowledging their inspirations and paying homage to them in a way that suits the series perfectly and doesn't feel out place - which was certainly the case here. Moreover, Loki's down-beat ending was something of a breath of fresh-air as it broke with the typical Marvel formula by having the hero ultimately lose, which is not dissimilar to Avengers: Infinity War. Loki's ending perfectly set up the future of the MCU, and left enough scope for fans to speculate over what is to come in season two and beyond.

More: Loki: 10 Questions Fans Have After Watching The Finale

Source: Eric Martin