A petition has been launched asking the government to issue a formal pardon to the gay mathematician Alan Turing.

Turing, who worked at Bletchley Park during the World War Two, was prosecuted for his sexual orientation in 1952 and obliged to undergo chemical castration. He committed suicide two years later, aged 41.

His invention of the Turing machine helped Allies crack the German codes created by the Nazis’ Enigma machine, enabling them to decipher intercepted messages and considerably aiding the war effort.

In 2009, after a campaign led by Richard Dawkins, Stephen Fry, Peter Tatchell and supported by PinkNews.co.uk, 30,805 people demanded that the then prime minister Gordon Brown issue an apology for Turing’s treatment on behalf of the British government. Mr Brown agreed to do so.

In 2009, he said: “It is no exaggeration to say that, without his outstanding contribution, the history of World War Two could well have been very different.”

The Queen unveiled a monument at Bletchley Park this summer to commemorate the work undertaken by the codebreakers.

Now, an official petition has been launched to request the government officially issue a pardon for Turing’s conviction for “gross indecency”.

It has accrued more than 3,600 signatures over three days, and if it reaches 100,000 will automatically trigger a debate in Parliament.

The petition reads: “We ask the HM Government to grant a pardon to Alan Turing for the conviction of ‘gross indecency’.

“In 1952, he was convicted of ‘gross indecency’ with another man and was forced to undergo so-called ‘organo-therapy’ – chemical castration. Two years later, he killed himself with cyanide, aged just 41.

“Alan Turing was driven to a terrible despair and early death by the nation he’d done so much to save. This remains a shame on the UK government and UK history.

“A pardon can go to some way to healing this damage. It may act as an apology to many of the other gay men, not as well known as Alan Turing, who were subjected to these laws.”

The petition can be found on the Government’s e-petitions website.