In Avengers: Infinity War, the Avengers do everything in their power to stop Thanos from snapping half the universe out of existence, very nearly killing him during the battle of Wakanda. Turns out, Nick Fury knew the snap would happen all along and even had a plan in place for when it did.

Over the past few years, Nick Fury has mostly been a peripheral figure, only recently reappearing at the very end of Avengers: Infinity War. But new evidence suggests his reemergence was for a good reason: he was prepared for Thanos’ snap. This theory is a two-parter, so stay with us.

The first part suggests Nick Fury knew a catastrophic event was bound to happen. It posits that at one point in the past Fury sought out the Ancient One—possibly for the Avengers initiative pre-Iron Man and Captain America—but she refused. Instead, she warns him that the events in Avengers: Infinity War would happen.

Her warning actually kicks off a series of events that connects Fury to Captain Marvel, who audiences will officially meet early next year. The theory suggests that the Ancient One tells Fury that he’ll need to find a way to contact Captain Marvel before his death.

People have noted that in the post-credits scene Fury appears in, he has a look on his face like he knows what’s going on. He has the pager to contact Captain Marvel because he knew such an event was coming. Fury waited to contact Captain Marvel until now because of the circumstances, whereas before the Avengers were able to take care of business.

This theory could tie back into the suggestion that Doctor Strange saw this outcome when he looked into the future. He knew Fury would contact Captain Marvel, who would then become a crucial part of eventually defeating Thanos.

Additionally, Strange knew that by saving Tony Stark, Stark would figure out how to utilize time travel to collect the Infinity Stones. The Ancient One’s prophecy to Nick Fury has had a domino effect that will lead into Avengers 4.

If true, the theories suggest that Fury is a crucial part of defeating Thanos, despite the former S.H.I.E.L.D director not featuring all that much over the past few years. Fury wasn’t panicking when he called Captain Marvel. Rather, he knew exactly what he was doing.