Why Was Alan Turing Prosecuted for Homosexuality?
Alan Turing helped change the course of modern history, but in 1952 the British state prosecuted him because of a private, consensual relationship with another man.
By Adrian Solen · Published July 15, 2026 · Approximately 7 minutes
The direct answer

Alan Turing was prosecuted in 1952 because British law criminalized sexual acts between men. After Turing acknowledged a consensual relationship with another man during a police investigation, he was charged with “gross indecency.”
The court offered him probation on the condition that he undergo hormonal treatment intended to suppress his sexuality. The treatment involved oestrogen and is now commonly described as chemical castration.
Who was Alan Turing?
Alan Turing was a British mathematician, logician, codebreaker, and one of the foundational figures in modern computer science. His work explored a question that was still extraordinary in the 1930s: what does it mean for a machine to perform a calculation?
During the Second World War, Turing worked at Bletchley Park, Britain’s secret codebreaking centre. He became closely involved in efforts to understand encrypted German communications, particularly messages protected by the Enigma system.
Turing contributed to the development of the Bombe, an electromechanical machine used to help codebreakers identify possible Enigma settings. His work formed part of a much larger operation involving mathematicians, linguists, engineers, intelligence analysts, radio operators, clerks, and thousands of other workers.
After the war, Turing continued working on computing, mathematics, and artificial intelligence. Today, his name is associated with computer science, artificial intelligence, cryptography, and the question of whether machines can appear to think.
Why was Alan Turing prosecuted?
Turing was not prosecuted because of his wartime activities, scientific work, or any accusation that he had harmed another person. He was prosecuted because he acknowledged a consensual sexual relationship with another man.
The relationship came to the attention of police during an investigation into a burglary at Turing’s home. Turing spoke openly about the relationship. At the time, however, honesty placed him in legal danger because sexual activity between men remained a criminal offence.
Turing and the other man were charged with gross indecency. Turing was convicted in 1952.
What was the gross indecency law?
The charge used against Turing came from Section 11 of the Criminal Law Amendment Act 1885. This provision became widely known as the Labouchere Amendment.
The law made acts of “gross indecency” between men criminal, whether they happened in public or private. The wording was broad and allowed the state to prosecute relationships and behaviour even when the more narrowly defined offence of sodomy could not be proved.
The law did not merely regulate public conduct. It allowed police, courts, and government institutions to reach into private relationships between consenting adults.
Oscar Wilde had been convicted under the same legal provision in 1895. More than half a century later, the law remained available for use against Turing and many other men.
What punishment did the court impose?
Turing was given a choice between imprisonment and probation subject to hormonal treatment. He accepted probation and underwent a course of oestrogen treatment.
The treatment was intended to reduce sexual desire. It also caused physical changes to his body. The state treated his sexuality not only as a crime but as something medicine should attempt to suppress.
This combination of criminal law and medical intervention was not unique to Turing. During the twentieth century, many gay, lesbian, bisexual, and gender-diverse people were subjected to treatments intended to change or eliminate parts of their identities.
Turing died in 1954, only two years after his conviction. He was 41 years old.
When was Alan Turing pardoned?
Public understanding of Turing’s scientific work and the injustice of his prosecution grew gradually. In 2009, the British government issued a formal apology for the way he had been treated.
On December 24, 2013, Turing received a posthumous royal pardon. The pardon recognized the exceptional injustice associated with his conviction, but it arrived almost sixty years after his death.
Turing’s pardon also raised a larger question: what about the thousands of other men who had been convicted under laws criminalizing consensual same-sex activity?
Later legislation created pardons for many people convicted under historical offences that would no longer be crimes. These measures became popularly associated with the name “Turing’s Law.”
Why does Alan Turing’s story still matter?
Turing’s story is often presented as a contradiction: a nation depended on his intelligence during war and later punished him for a private part of his life.
But the deeper lesson is not only about contradiction. It is about the power of law, medicine, public morality, and social shame to define a person as unacceptable.
Intelligence, service, professional success, and public usefulness did not protect Turing. His accomplishments may have eventually made his name famous, but many less famous people experienced similar laws without receiving public recognition, an official apology, or a royal pardon.
His story demonstrates why historical discussions of sexuality cannot be reduced to abstract political arguments. Behind every law were individual lives, relationships, families, careers, fears, and losses.
From criminalization to partial reform
The law did not change immediately after Turing’s conviction. The 1957 Wolfenden Report recommended that consensual sexual activity between adult men in private should no longer be a criminal offence.
Partial decriminalization in England and Wales did not arrive until the Sexual Offences Act 1967. Even then, restrictions and inequalities remained, and legal reform continued over several decades.
Turing’s prosecution therefore belongs to a wider history. It shows how governments can maintain laws long after their human costs have become visible—and how recognition of injustice often arrives much later than justice itself.
Sources and further reading
The historical information in this article was checked against the following institutional sources.
No public comments yet
Be the first to share a thoughtful note. Approved comments will appear here.