Getty Images
It turns out he was very close to not getting either of those roles.
During this time, McKellen was also offered a role opposite Tom Cruise in "Mission: Impossible II."
20th Century Fox via YouTube
"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." McKellen told People Magazine.
However, McKellen didn't want to say yes to a project without knowing the whole story first.
"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.'" McKellen said.
According to McKellen, "X-Men" director Bryan Singer asked him to play Magneto the next day, to which he said yes. Not long after, director Peter Jackson asked Mckellen to play the wizard Gandalf.
New Line Cinema via YouTube
McKellen's chance to play Gandalf was almost put in jeopardy, as filming for "X-Men" ran way over schedule. He made it to New Zealand just on time to film "The Fellowship of the Ring."
However, he never made it to "Mission: Impossible II." And maybe that was for the better.
"Meanwhile, 'Mission: Impossible' was put off, put off, put off," said McKellen. "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.' It's all about luck - being there at the right time and ready for it."