A British programmer is petitioning the government to apologise to gay mathematician Alan Turing for his prosecution for homosexuality.

Turing committed suicide in 1954.

He famously invented the Turing machine and cracked the German Enigma code during World War Two, but killed himself after being convicted of having a sexual relationship with another man.

He was given the choice of going to prison or undergoing chemical castration and opted for the latter.

Programmer John Graham-Cumming has now set up an online petition to call for a government apology to Turing for his prosecution.

He told PinkNews.co.uk: “I think that Alan Turing hasn’t been recognised in Britain for his enormous contribution because he died in his forties and almost certainly because he was gay.

“It is atrocious that we don’t recognise this man and the only way to do so is to apologise to him. This man was a national treasure and we hounded him to his death.

“One of the things for people in the computing world is that he was part of the war effort but we don’t give him recognition in the same way as other heroes. To me, he was a hero in the second world war.”

Turing was awarded an OBE in 1945 for his wartime services to the Foreign Offices. He has received many posthumous awards. The computing world’s equivalent of the Nobel Prize, given each year by the Association for Computing Machinery, has been called the Turing Award since 1966.

To sign the petition, click here