Lord of the Rings star Sir Ian McKellen would never encourage any actor to hide their sexuality for the sake of their career.

The British actor revealed he was homosexual during a 1988 radio debate about a policy put in place by British Prime Minister Margaret Thatcher that he felt persecuted gay men. Rather than affect his stage and screen opportunities, the big reveal actually opened doors for the 76 year old and led to some of the biggest roles of his career.

“It all happened after coming out," he told The Hollywood Reporter while discussing his film career. "I had no idea this silly thing was a weight on my shoulders. That's my message to anyone in this town who thinks, 'I've got to stay in the closet to be successful in films', I didn't."

There are many gay actors in Hollywood today who aren’t typecast by their sexuality, including Neil Patrick Harris, Zachary Quinto, Magic Mike star Matt Bomer and Luke Evans, but Sir Ian worries there are many celebrities out there who are still hiding their true identities, and he's urging them all to reconsider their stance.

"Do you want to be a famous movie star who has love scenes with ladies and in private be an unhappy gay'” he questioned. “There's no choice. Forget the career, dear. Go and do something else... A closet's a really nasty place to live, you know' It's dirty, it's dusty, it's full of skeletons. You don't want it. Open that door — fling it wide and be yourself."

After many years working in theatre Ian has been thrilled to work on blockbusters like the Lord of the Rings and X-Men franchises, but he revealed that none of them would have happened if he’d signed on to appear in Mission: Impossible II.

“If I'd done that movie, which was delayed and delayed and delayed, I would have missed out on doing the first X-Men movie and I would have missed out on doing Lord of the Rings,” he said.