WARNING: The following article contains major spoilers for Avengers: Endgame, in theaters now.

For some time we've known Avengers: Endgame would mark the end of an era with regard to the six original team members. With Chris Evans' contract expiring with Marvel Studios, many expected Steve Roger would either sacrifice himself in the battle against Thanos or retire in its aftermath. Instead, however, the blockbuster sequel has him hand off the shield to Anthony Mackie's Sam Wilson in the finale.

But while movie-goers who aren't well-versed in the source material may think this is a happy ending Steve paints for himself, this changing of the guard is actually pulled from the Marvel NOW! era of comics.

In Endgame, bringing back all of those lost in Thanos' universe-altering snap, Tony Stark dies, and it's left to Steve to return the Infinity Stones to their proper places in the timeline. Although his trip through the time should take mere seconds, Steve doesn't come back through the Quantum Tunnel. Instead, a waiting Sam and Bucky (Sebastian Stan) spot an old man on a bench overlooking the lake at the New Avengers Facility.

Bucky instantly recognizes him, and sends Sam to meet a much older Steve, who indicates he remained in the past to live a life of happiness with Peggy Carter. As such, it's time to hand off the mantle, he passes the shield to Sam, who becomes the MCU's new Captain America.

RELATED: Which Characters Don't Survive Avengers: Endgame?

A similar moment played out in 2014, in Marvel's Captain America #25 by Rick Remender, Carlos Pacheco and Stuart Immonen, although the circumstances were different. After Steve was trapped by Arnim Zola in Dimension Z, the Super-Soldier serum coursing through his veins was affected by the Iron Nail (a former S.H.I.E.L.D. agent), which caused Cap to rapidly age, resulting in what comics fans refer to as Old Man Steve.

When Zola invaded Earth, Steve teamed with his son from that dimension, Ian, to try to stop the villain, culminating in a showdown in New York. There, the Avengers reunited, but with a massive bomb about to explode, it was Falcon who flew it into the sky, where it detonated. Luckily, his Vibranium wings absorbed most of the blast energy, and Falcon survived. That led Steve to decide the baton should be passed to one of the mostloyal soldiers he knew.

In the MCU, Sam is devoted ally who has followed Steve through thick and thin, as seen in The Winter Soldier and Civil War. Recognizing Sam as a symbol of hope, it's obvious why Old Man Steve chooses him as his successor.

Sam eventually returned the shield in the comics, but in the MCU, Steve's exit is more permanent. He's not going to be a tactical head, coordinating missions and waiting to reclaim the mantle. This is the new status quo, with Sam now carrying the torch; it's all him now, with no do-overs or take-backs.

RELATED: The MCU's Latest Unexpected Death Is a Major Gut-Punch

As for the tale of two Sams, what's constant is the philosophy they embody. The fight on the side of freedom, and are willing to lay down their lives for others, and for what they believe in. With that in mind, both versions of Steve Rogers couldn't have chosen better replacements.

Directed by Joe and Anthony Russo, Avengers: Endgame stars Robert Downey Jr. as Iron Man, Chris Evans as Captain America, Mark Ruffalo as Bruce Banner, Chris Hemsworth as Thor, Scarlett Johansson as Black Widow, Jeremy Renner as Hawkeye, Brie Larson as Captain Marvel, Paul Rudd as Ant-Man, Don Cheadle as War Machine, Karen Gillan as Nebula, Danai Gurira as Okoye and Bradley Cooper as Rocket, with Gwyneth Paltrow Pepper Potts, Jon Favreau as Happy Hogan, Benedict Wong as Wong, Tessa Thompson as Valkyrie and Josh Brolin as Thanos.