Sir Ian McKellen has attributed much of his recent success to ''luck''.

The award-winning actor - who was knighted in 1991 for services to the performing arts and was awarded a Freeman of the city of London last month - says a number of his contemporaries would have fared as well in the iconic role of Gandalf in 'The Lord of the Rings', including John Hurt.

Speaking at TimesTalks London, Sir Ian - who was sat beside his 'Vicious' co-star Sir Derek Jacobi - remarked: ''We have been so lucky right throughout our careers. It's not just actors our age who perhaps don't work anymore. We've had friends right throughout our careers - of our age - who didn't have work, who should have had work.

''We're no better than a whole lot of people. But genuinely, being quite honest about it all, it's luck. John Hurt could've played Gandalf.''

The 75-year-old star has also starred in the 'X-Men' films as Magneto and in a recent interview, he claimed the comic book story is an metaphor for young gay men.

Sir Ian - who came out as gay in 1988 - said: ''The people who created 'X-Men' were writing a parable about the way society treated minorities - and the demographic for the comics over the years has been young blacks, young Jews and young gays. They all identify with the mutants - and they're meant to.''