He may have played a pivotal role in securing victory in the Second World War for his country six years earlier, but few outside the academic community would have recognised Alan Turing as he made his way down Manchester's Oxford Street shortly before Christmas in 1951. Someone who did notice the athletically-built scientist, however, was a young working class gay man called Arnold Murray.

Homosexuality was still illegal under the same repressive laws which had sent Oscar Wilde to jail half a century earlier. But regardless of the risk, the chance encounter was to develop into something more substantial and Murray spent a number of nights at the older man's modest home in suburban Wilmslow.

A month later, after Turing, a veteran of the then still secret Bletchley Park code-cracking team, had been giving a talk to the BBC on his pioneering work on artificial intelligence, he returned home to find his house burgled.

Download the new Independent Premium app Sharing the full story, not just the headlines

The culprit was an acquaintance of Murray's, who would prey on Murray's lovers, thinking they would be so afraid of being outed that they would not report the thefts to the police.

But Turing defied this convention and went straight to the police, where he admitted his affair – a "crime" for which he was spared the normal two-year jail term in favour of a hormonal treatment designed to beef up his masculine urges and suppress his homosexuality. The resulting publicity was to prove too much to bear and in June 1954, the 41-year-old was found dead in bed by his housekeeper. He had eaten an apple he had laced with poison.

The consequences which unfolded were not only a tragedy for Turing, his friends and family, it also robbed the world of one of the greatest thinkers of the 20th century. Now campaigners are demanding an official apology from the Prime Minister Gordon Brown, recognising the "consequences of prejudice that ended his career". More than 700 people have signed a petition started by the leading computer scientist John Graham-Cumming on the Downing Street website, including gay rights campaigners, politicians and scientists.

"What really annoyed me about this was here was a man who died in his early 40s because he was a homosexual. He was a war hero but here was a part of our history that we were turning a blind eye to when we should be celebrating it. There were a lot of homosexual people during the war doing incredible work – if it was not for Turing we would most likely be having this conversation in German," Mr Graham-Cumming said.

Turing had already made major contributions to mathematics and the embryonic computing sciences before the outbreak of hostilities in 1939. But it was for his work among the wartime Enigma code crackers at Bletchley Park for which he will be best remembered. "Turing realised that we had to turn what was then a cottage industry of code breaking into a full scale industry. He was probably the most important person there," said Simon Greenish, director of Bletchley Park Trust.

His "bombe" machine was able to rapidly de-code the 158 million, million, million variations used by the Nazis in their commands with the creation of a prototype high speed processor. It saved tens of thousands of lives and variations on the original helped both the British and the US to eventual victory.

But although he was, by any measure, a genius, Turing was an idiosyncratic figure bordering on the strange. A runner and rower of Olympic ability, he used to occasionally run the 40 miles between London and Bletchley to attend meetings. His behaviour and high-pitched voice drew furtive smiles from colleagues who tolerated his eccentricities such as chaining his tea mug to the radiator or riding his bicycle wearing a gas mask to avoid hay fever.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

After the war, and having been awarded an OBE, Turing moved to the US to work at the National Physical laboratory where he began work on creating the stored-program computer but returned to Manchester in 1948, where he continued his pioneering work in the field of mathematical biology. But the arrest and conviction in 1952 for gross indecency shattered him. The chemical castration caused his breasts to enlarge and bloated his athletic physique. He was also banned from travelling to America. What followed was described by his biographer David Leavitt as a "slow, sad descent into grief and madness" and Turing began travelling abroad in search of sex safe beyond the reach of the British law.

Professor Richard Gill, Professor of mathematical statistics at Leiden University, is among those to sign the petition. "He was one of the geniuses of the 20th century and I have the feeling he was also a pretty decent guy. How his life ended was incredibly sad. In his last years he was thinking very deeply about some very difficult puzzles which give most people a bit of a headache. He was surely going further with this work and was certainly not finished yet," he said.

But there is another twist in the story of Alan Turing. Some have been moved to question whether he saw himself as a gay martyr. His chosen mode of death echoed his favourite fairytale Snow White, from which he was often moved to quote the phrase "Dip the apple in the brew, let the sleeping death seep through". His family insisted his death was merely a tragic accident while others have even hinted more darkly at murder because the inquest was never to establish that the apple contained cyanide. Recent years have seen his reputation partly restored. A memorial statue has been erected on the fringes of Manchester's Gay Village while the city's inner ring road bears his name. An official apology, however, continues to elude him.

Homosexuality and the law: Why Alan Turing was considered a criminal

*The 1885 Criminal Law Amendment Act made any homosexual act illegal, even in private. Among the most famous prosecutions was that of Oscar Wilde in 1895.

*Section 11 stated that "any male person who, in public or private, commits ... any act of gross indecency with another male person, shall be guilty of a misdemeanor, and being convicted thereof shall be liable at the discretion of the court to be imprisoned for any term not exceeding two years, with or without hard labour."

*This part of the Act was inserted at the last minute after being drafted by the MP Henry Labouchere. It did not fit in with the rest of the Act, which dealt with sex crimes relating to young women, but was still passed by the House of Commons.

*The amendment was described as a "blackmailer's charter" as it effectively outlawed any and every form of male homosexuality. It prompted a number of prosecutions.

*The Act was repealed in England and Wales in 1956, but homosexuality was not fully legalised until 1967.