The Lord of the Rings and Hobbit star Sir Ian McKellen has told Vanity Fair magazine that he regrets not coming out until he was 49 and that he would have done earlier if he knew that his reception would be so warm

The co-founder of gay rights charity Stonewall said: “There have been no negatives whatsoever… The minute I came out, I felt immediately better in every way. I felt relieved that I wasn’t lying.

“You know, when I was growing up in 1950s England, there were no gay clubs I knew about. There were no bars. Homosexuals were shamed publicly and imprisoned. You were on your own, looking over your shoulder all the time, hoping in the handshake of a stranger that he might be somebody gay.”

The star said that one of the reasons he got into acting was the acceptability of gay men within the profession. “I’d heard you could meet queers. So it proved,” he said. “I was never closeted with friends and colleagues in the professional theatre, but I wasn’t out to my closest blood relatives.”

In a 2011 interview, Sir Ian said: “I first accepted I was gay when I was about 16 and I wasn’t attracted to girls in the way that my friends were. I had this secret and there was nothing I could do about it because, as far as I knew, I was the only person.”

In reality, Sir Ian’s two best friends were also hiding that they were gay and it wasn’t until 20 years later that they discovered the truth.

He added: “There was nothing positive about homosexuality in the newspapers and it was against the law to make love. I knew people my age who’d been sent to prison for doing it! When I tell schoolchildren that, they can’t believe it.”

Last week, Sir Ian supported moves towards equal marriage in New Zealand saying: “New Zealand gave women the vote before every other country in the world, the rest of the world has looked towards New Zealand for social advance and here we are again- this time at the exciting prospect of two people of the same gender being able to get married and to join the rest of the population.

“It will be a popular move, I know, and I’m glad your major political parties have embraced it, supported too by the younger generation who see things a lot more clearly than people of my age.

“My support is with you and I hope that by the time I return to Middle-earth I might even be able to get married there.”