Ed Miliband has vowed to adopt a ‘Turing’s law’ to allow the pardoning of tens of thousands of men convicted of gay sex when it was illegal. Alan Turing, the Second World War codebreaker, was convicted of homosexual activity in 1952 but given a posthumous royal pardon 15 months ago. Since then his relatives have campaigned for the 49,000 men convicted under gross indecency laws to be similarly pardoned. Scroll down for video . Labour leader Ed Miliband has vowed to introduce a new 'Turing's Law' pardoning men convicted of historic gay sex 'offences' like the World War Two hero Alan Turing . Under a law passed by the coalition government, anyone still alive who has a conviction or caution for consensual gay sex can apply to the Home Office to have the offences removed from their records. Mr Miliband has said he will extend this to the families and friends of gay men who received convictions in their lifetime but died before they could apply to have the records changed. The Labour leader told Gay Times that, if elected Prime Minister in May, he would make the matter a priority. The campaign to parden gay men convicted of 'gross indecency' has been backed by celebrities including Hollywood star Benedict Cumberbatch, who played Mr Turing in the Oscar-winning drama The Imitation Game . He said: ‘I think it’s worth saying that we do want to extend the principles being applied to Alan Turing and his family, to be able to say to others who were convicted of a criminal offence simply because of the person that they loved – whether they are alive or no longer alive – that we can get a pardon for them. ‘I think it’s a stain on our society, frankly. I think it’s right what’s been done in relation to Alan Turing and his family, but there are also other families that will have had relatives who were convicted, as I say, simply because of the person they love. 'And I think it’s time we acted for them, too. I think we owe it to the LGBT [Lesbian, Gay, Bisexual and Transgender] community to make this move.’ Turing died after eating an apple laced with cyanide . On 8 June 1954, Turing's cleaner found him dead. A post-mortem examination established the cause of death was cyanide poisoning. An inquest determined that he had committed suicide, and he was cremated at Woking Crematorium on 12 June. Several scholars, and even his family, have suggested Turing's death was not suicide - and instead either an accident or linked to a conspiracy. When his body was discovered, an apple laid half-eaten next to his bed. It was never tested for cyanide but it is speculated it was the source of the fatal does. Some more peculiar theories suggest Turing was 'obsessed' with fairytale Snow White and the Seven Dwarfs and his death was inspired by the poison apple in the story. The theory was supported in an article in The Guardian written by Turing's friend, the author Alan Garner, in 2011. However, later evidence suggested that Turing habitually ate an apple before bed, and it was not unusual for it to be discarded half-eaten. His mother is said to have thought the ingestion was accidental, cause by her son's storage of chemicals in his home. Speaking on the 100th anniversary of Alan Turing's birth on 23rd June 2012, Professor of Philosophy Jack Copeland, University of Canterbury, Christchurch, New Zealand, questioned the evidence given to the inquiry in 1954. He said there was no evidence of premeditation - there was no suicide note and he seemed to be in a cheerful mood in the days leading up to his death. He added that Turing's career was at an all time high and that he would not want to intentionally kill himself. He pointer out that his friend Robin Gandy stayed with Turing a week before his death and he remarked how happy Turing seemed . Finally, the academic remarked that the inquest was so bad that Turing could even have been murdered. Although it is is unclear who would have wanted to murder him Mr Copeland said his work at Bletchly Park was under strict secrecy until well after his death. Last week relatives of the mathematician and codebreaker delivered a petition to Downing Street calling for all those convicted under anti-gay laws to be pardoned. Celebrities including Benedict Cumberbatch, who played Turing in the Oscar-winning film The Imitation Game, have also backed the campaign. During the Second World War, Turing was pivotal in cracking the German Enigma codes, which gave vital information about Hitler’s forces. Historians credit the work of Turing and his fellow codebreakers at Bletchley Park in Buckinghamshire with shortening the war by up to two years, saving countless lives. Turing is also widely seen as the father of computer science and artificial intelligence. But in 1952 he was convicted for homosexual activity, which was illegal at the time, after having an affair with a 19-year-old man in Manchester. Turing underwent ‘chemical castration’ as part of his sentence and his conviction led to the removal of his security clearance and meant he was no longer able to work for GCHQ. He died two years later, aged 41, having apparently committed suicide by eating an apple laced with cyanide. In 2013 Turing was granted a royal pardon after a request from Justice Secretary Chris Grayling. Cumberbatch said: ‘Alan Turing was not only prosecuted, but quite arguably persuaded to end his own life early, by a society who called him a criminal for simply seeking out the love he deserved, as all human beings do.’
Relatives of gay WW2 codebreaker Alan Turing petitioned  Downing Street . Turing was prosecuted for being gay but he was  pardoned in 2013 . Benedict Cumberbatch played Turing in the film The Imitation Game . Some 49,000 men were convicted of 'gross indecency' under anti-gay laws . Miliband vowed to introduce a 'Turing's Law' pardoning gay prosecutions .