Veteran actor Sir Ian McKellen has said he thinks gay people can relate to the struggles faced by mutants in X-Men.

In promoting the latest film in the series, ‘X-Men: Days of Future Past’, in which Sir Ian plays Magneto, he said he could relate to the struggle for acceptance.

He also said that director Bryan Singer, used the point to convince him to take the role in the first place.

“When Bryan Singer asked me to be in these films he sold it to me on just this point: as a gay man you can identify with mutants – people who have talents [but] are despised by society as they’re different,” he said.

“In many areas of the world being gay is still a mutancy which is clearly not tolerated in some societies. You can be put to death for your sexuality. Not in this country. We have advanced – it’s been one of the great joys of my life – since these films have been made.”

Sir Ian McKellen last week joked that Nigel Farage “needs to get out more” after the UKIP leader claimed that most over-70s aren’t comfortable with gays.

Earlier this month, while defending UKIP MEP Roger Helmer, Farage had said: “He’s somebody of 70 years of age who grew up with a strong Christian Bible background (…)  If we asked the 70s and over in this country how they felt about it, most of them still feel uncomfortable.”

McKellen, 74, ridiculed the comments on Channel 4 News last week, appearing alongside his 73-year-old X-Men co-star Patrick Stewart.

He said: “He hasn’t talked to this over 70 or [pointing to Stewart] this one. I think, frankly, Farage needs to get out more.”