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

Of all the founding members of the Avengers to play a major role in Avengers: Endgame, Black Widow certainly is one of the most pivotal, especially thanks to the sacrifice she makes to secure the Soul Stone on Vormir and help her teammates undo the damage caused by Thanos with the Infinity Gauntlet. As reformed villain who defected to S.H.I.E.L.D. from the KGB, Natasha Romanov transitioned from morally gray super-spy to one of the greatest heroes in the Marvel Cinematic Universe since her relatively humble beginnings in Iron Man 2.

Now, CBR is taking a closer look at how Natasha's role in Avengers: Infinity War informed her to step up into a leadership position in Endgame and ultimately lead to her heroic death to bring back the lives of trillions.

RELATED: Woman May Have Exposed Avengers: Endgame Audience to Measles

Black Widow in Infinity War

Having helped Steve Rogers and Bucky Barnes escape during their battle with the Avengers in Captain America: Civil War, Natasha leaves the team to join a fugitive rogue faction of Avengers after the events of the film. While they're still on the run for their unsanctioned heroic activities two years later, Black Widow makes her first appearance in Infinity War saving the Scarlet Witch and Vision from Proxima Midnight and Corvus Glaive in Scotland, gravely wounding Corvus with his own spear before the two members of the Black Order escape to deep space.

Reunited with War Machine and Bruce Banner, Natasha helps lead the Avengers in the Battle of Wakanda while Shuri races to extract the Mind Stone powering him. As the battle intensifies against the Black Order and their army of voracious Outriders, Black Widow, Scarlet Witch and Dora Milaje commander Okoye fight and ultimately kill the Black Order's Proxima Midnight. However, after Thanos himself enters the battle to recover the Mind Stone, Black Widow and her fellow MCU heroes are easily dispatched by the Mad Titan, and can only watch as he uses the fully powered Infinity Gauntlet to wipe out half of all life in the universe.

Picking Up the Pieces in Endgame

Black Widow in Avengers: Endgame

Three weeks after the events of Infinity War, Black Widow and the rest of the surviving heroes have regrouped at Avengers headquarters in upstate New York. Haunted by the loss of billions around the world, Natasha joins up without hesitation to confront Thanos on a far-away world only to learn to that he has used the Infinity Gauntlet to destroy the Infinity Stones and prevent anyone from undoing his final victory.

RELATED: An Avengers: Endgame Bootleg Actually Aired On Philippine TV

Five years later, Natasha channels her guilt and grief into overseeing the recovery efforts around the universe, coordinating between the surviving Guardians of the Galaxy, Carol Danvers and the heroes of Earth in a key leadership role that helped restore some order to a universe plunged into chaos after Thanos' actions. Buried in her work while Captain America and the Hulk process their grief in different ways, Natasha also tracks her close friend Clint Barton, who has taken on a new alter ego as Ronin, dealing out lethal justice to criminal syndicates around the world with extreme prejudice.

This was an extraordinary display of growth for the character, who had often held authority figures in contempt, as seen by her testimony to Congress in Captain America: The Winter Soldier. By this point, Natasha was effectively the point person for all the remaining superheroes in the MCU.

Sacrifice on Vormir

natasha endgame

After developing a means to successfully travel through time and space while recruiting Clint to join them once again, the surviving heroes travel to various points in MCU history to recover the Infinity Stones for themselves to use with their own Infinity Gauntlet. After traveling to Vormir in 2014 with Clint, the two former S.H.I.E.L.D. operatives learn that a sacrifice is needed for the Soul Stone to appear. Without hesitation, Natasha throws herself from the planet's tower after subduing Clint, which gave the Avengers the Soul Stone at the expense of her life.

RELATED: Russo Brothers Break Down the MCU's Rules For Time Travel

Natasha's alliances have always shifted, whether she's defected to S.H.I.E.L.D. or temporarily sided with Iron Man before joining Captain America's rogue Avengers unit. After Thanos' victory, Black Widow became the cornerstone of her adoptive superhero family and was the most proactive hero in leading recovery efforts and coordinating resources across the universe from behind-the-scenes. With her sacrifice on Vormir to secure the Soul Stone, Natasha made the restoration of half of all life in the universe and the Mad Titan's defeat possible in the first place.

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.