Comic Al Murray has denied that having an illustrious ancestor makes him a "toff" and told how he discovered his great-great-aunt spent her life in an asylum simply for having a learning disability.

The Pub Landlord star, 46, found out about Laura while taking part in a new two-part ITV documentary, Secrets From The Asylum.

Murray already knew that his great-great-great-grandfather was the 19th century novelist William Makepeace Thackeray, the author of Vanity Fair.

The comedian, famous for his working class, politically incorrect Pub Landlord alter-ego, told Radio Times magazine that it irritated him that he was branded posh because of the connection.

The star, who was educated at a boarding school, said: "When I was younger the Thackeray thing used to be a 'So what?' question. In general that's still my attitude.

"It's so long ago. And when people come to me and go, 'Er, look who your great-great-great-grandfather is - that means you're a toff,' you think 'Sod off!'

"I don't really feel any connection with him at all. Tell me about your great-great-great-grandparents and then I'll judge you arbitrarily over nothing."

Murray added: "It's a strange and interesting thing to have in your life. But I don't get up in the morning thinking 'I'm the great man's three times great-grandson,' because I think that would make me a bit of a d**k."

Secrets From The Asylum tells how Thackeray's wife Isabella had a breakdown at the age of 23 and the author sought several treatments to try and save the mother-of-two from a lifetime in the asylums.

But it was another discovery, made while filming the programme, that left him blinking back tears.

Murray found out that his great-great-aunt Laura was consigned by her family to an asylum "for imbeciles and idiots" for her whole life, just for having a learning disability.

Laura was a victim of the eugenics movement, which gained support in the 20th century, in which people who were deemed "mentally deficient" were sent to asylums.

"That was the thing that really moved me - how nasty that whole movement was. And that someone in my family got caught up in it," he told Radio Times magazine.

"When you get the call you go, 'They're not going to get me. They're not going to make me cry.' But Laura's story and that whole movement that developed to do with the 'feeble-minded' and 'not contributing' - it's hardcore."

He said: "She looks like the women in my family - like one of my aunties and a little like one of my daughters. That made it seem real, rather than fusty Victorians. And it wasn't long ago - she died during the Second World War."

He added: "What the late Victorians fell on was this idea of genealogy and how we've got to remove these people from society by not letting them breed. It was a classic moral panic. You could put the word 'Jews' instead of 'feeble-minded' or the word 'Romanians' today - it's the same rhetoric."

Murray said of learning that at least two members of his family were deemed, by the standards of the time, to have mental health issues: "It does make you think. Am I carrying a gene? You have to entertain that idea. But then you also have to say: so what? There's depression in everybody's family. It's part of who we are. You've got to treat it humanely."

The comic, who is currently researching a new history of the Second World War, said: "It's weird, I do take the stand-up very seriously, but I have run into this thing of, 'You play the Pub Landlord, he's a bloody idiot. How could you possibly be clever?' It always amuses me that people get stuck there."