McKellen says he was only free to work on Lord of the Rings because he turned down a role in Mission Impossible II:
It’s ridiculous that I’ve gotten to play both Gandalf [in the Lord of the Rings films] and Magneto [in the X-Men films]. How did that come about? One would have been enough. But two? And [it] also nearly might not have happened. 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. 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. 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. It’s all about luck – being there at the right time and ready for it.