A private member’s bill has been introduced in the House of Lords, which seeks to pardon the gay computer genius Alan Turing, who was prosecuted for gross indecency in 1952, after having a relationship with another man.

The Alan Turing (Statutory Pardon) Bill was introduced in the House of Lords for its first reading yesterday by Liberal Democrat peer Lord (John) Sharkey.

The gay mathematical genius and codebreaker was the effective inventor of the modern computer and a key driver behind the victory over the Nazis.

He killed himself in 1952, two years after being sentenced to chemical castration.

In 2009, after a campaign led by Richard Dawkins, Stephen Fry and Peter Tatchell and supported by PinkNews.co.uk, the then prime minister Gordon Brown issue an apology for Turing’s treatment on behalf of the British government.

Liberal Democrat peer, Lord (John) Sharkey has now introduced the bill in the House of Lords. Upon announcing the bill last year, he said it would give Turing the pardon he “so clearly deserves”.

Justice Minister Lord McNally last year said of the prospect of a pardon: “A posthumous pardon was not considered appropriate as Alan Turing was properly convicted of what at the time was a criminal offence. He would have known that his offence was against the law and that he would be prosecuted.

“It is tragic that Alan Turing was convicted of an offence which now seems both cruel and absurd – particularly poignant given his outstanding contribution to the war effort.

“However, the law at the time required a prosecution and, as such, long-standing policy has been to accept that such convictions took place and, rather than trying to alter the historical context and to put right what cannot be put right, ensure instead that we never again return to those times.”

Lord Sharkey himself said: “Alan Turing helped save this country. His work on cracking the Enigma Code at Bletchley Park during World War II undoubtedly changed the course of the war and saved many thousands of lives.

“Instead of being rewarded by his country, he was cruelly punished and convicted simply for being gay.

“If my Bill becomes law, as I hope it will, then this will finally go some way towards acknowledging the debt we all owe to Alan Turing and grant him the pardon he so clearly deserves.”

A petition to have Turing pardoned which closed in November gathered 37,402 signatures in favour of granting him an official pardon.