The Foreign Office has advised Sir Ian McKellen “not to go to Russia” because of the country’s homophobic laws, according to the gay actor.

“That’s why I can’t go… they couldn’t protect me from those laws,” Sir Ian, 74, told the Radio Times.

“Two and a half hours from London! In the land of Tchaikovsky, Diaghilev, Rudolf Nureyev – gay artists whose sexuality informed their work.”

“Imagine trying to be a gay actor, a gay anything in modern Russia?,” Sir Ian added.

“Where to be positively oneself, to be affectionate in public with someone you love of the same gender, or to talk of that love in the hearing of anyone under 18, will put you in prison?

“That’s why I can’t go to Russia.”

In September, Sir Ian warned against boycotting next year’s Winter Olympics.

The Games are being held in the Russian city of Sochi in February. Sir Ian said: “If we were to not hold the Games because of internal politics of the country in question – probably they would never take place (anywhere).”

President Vladimir Putin signed legislation in June banning the promotion of “non-traditional relationships” toward minors.

It prescribes fines for providing information about homosexuality to people under the age of 18 – ranging from 4,000 roubles (£78) for an individual to 1m roubles (£19,620) for organisations.

Last weekend, Sir Elton John interrupted his performance in Moscow to condemn Russia’s anti-gay laws as “inhumane”. 

The performer defied the people who wanted him banned from performing, saying he had travelled to Russia because “many, many more people asked me to come”.

Sir Ian McKellen also hit back at comments made by Homeland star Damian Lewis in a Guardian interview earlier this year.

Lewis said he did not want to end up “as one of those slightly over-the-top, fruity actors who would have an illustrious career on stage, but wouldn’t start getting any kind of film work until I was 50 and then start playing wizards”.

Sir Ian told the Radio Times: “So he feels sorry for me, does he? Well, I’m very happy, he needn’t worry about me”, although he did agree Lewis’s remark was “fair comment”.

However, he went on to say: “To rebut it, I wouldn’t like to have been one of those actors who hit stardom quite early on and expected it to continue and was stuck doing scripts that I didn’t particularly like just to keep the income up.

“I’ve always wanted to get better as an actor. And I have got better. You’ve only got to see my early work to see that.”

Regarding the “fruity voice” comment, Sir Ian said: “Well, it may be a voice that is trained like an opera singer’s voice: to fill a large space. It is unnatural.”

He added: “To be allowed for the first time in your later career to play leading parts in extremely popular movies is not a situation to worry about.”