Thanks to his roles in the X-Men and Lord of the Rings franchises, Ian McKellen has become an iconic part of mainstream pop culture, earning him notoriety with geeky fans he may never have had if he’d stuck to theatre and more serious, prestige roles. And if Tom Cruise had his way, McKellen might not have taken those roles and become the pop culture icon he is today.

Okay, not Tom Cruise in particular, necessarily — Mission: Impossible II would be to blame. In an interview with People, McKellen tells the story of how the action sequel could have cost him roles as Gandalf in The Lord of the Rings (and subsequently, The Hobbit films) and Magneto in the X-Men franchise.

I got offered a part in Mission: Impossible II with Tom Cruise, but they wouldn’t let me see the whole script because I might have spilled the beans. I only got my scenes.

Well, I couldn’t judge from reading just those scenes what the script was like. So I said no. And my agent said, “You cant say no to working with Tom Cruise!” and I said, “I think I will.”

The next day, Bryan Singer asked me to play Magneto and then Peter Jackson asked me to play Gandalf, and I said yes to both.

The role McKellen was offered in Mission: Impossible II was likely the one that went to Rade Serbedzija. And although he was free to star in both X-Men and The Lord of the Rings, McKellen goes on to describe the scheduling conflicts between those two films, settled very generously and without incident by both Bryan Singer and Peter Jackson:

Then, Bryan Singer’s first X-Men overran its preparation. It had to delay, delay, delay, delay. So I had to call up Peter Jackson and say, “I’m sorry. I can’t play Gandalf because X-Men, which I agreed to do first, is overrunning.”

And Peter Jackson said, “Well, I’ll keep it free for you. Let me know what happens.” I told Bryan Singer and he said, “Well, you must do Gandalf. I’ll make sure you get out in time.”

And he did – with three days to spare.

Meanwhile, Mission Impossible was put off, put off, put off. And if I had decided to do that, I wouldn’t have been in X-Men and I wouldn’t have been in Lord of the Rings.

As Vanity Fair points out, Dougray Scott was the main villain in Mission: Impossible II, and he was originally supposed to play Wolverine in Singer’s X-Men. Due to the delays in the M:I II schedule, Scott had to drop out of X-Men, and the role went to a little-known actor named Hugh Jackman. Thanks, Tom Cruise!

More From ScreenCrush