Wartime papers of computer pioneer Alan Turing will stay at Bletchley Park, where he helped crack the German Enigma code

This article is more than 9 years old

This article is more than 9 years old

Second world war papers by the UK's most famous codebreaker, Alan Turing, have been bought for the nation with an 11th-hour bid by the National Heritage Memorial Fund.

Turing's work was in danger of going to a private buyer abroad but will now stay in its "spritual home", Bletchley Park, which was the centre of Britain's top secret code-breaking effort during the war.

The mathematician, often dubbed "the father of computer science", helped crack the German Enigma code while stationed at Bletchley Park.

The National Heritage Memorial Fund on Thursday pledged a last-minute bid of £213,000 to save the papers for the museum at the Buckinghamshire estate.

Dame Jenny Abramsky, the chairman of the NHMF, said: "This is such welcome news. Alan Turing was a true war hero and played an absolutely crucial role during the second world war.

"The National Heritage Memorial Fund was set up in memory of those who have given their lives for the UK and this grant will now ensure that this extremely rare collection of his work stands as a permanent memorial to the man and to all those who paid the ultimate price in service to this nation."

The wartime documents went under the hammer at auctioneers Christies in November with a £500,000 valuation.

An online campaign by IT journalist Gareth Halfacree managed to raise £28,500 through public donations in just over a week. In addition, Google donated $100,000 (£62,700) to the Bletchley Park bid, but it was not enough to secure the papers.

Halfacree feared that the wartime papers would be bought by a private buyer and never seen again in Turing's home country. "The likely bidders are tech companies from Silicon Valley, just months after going public," he told the Guardian in November. "It's the sort of thing they'd like to have on their wall. I just hope whoever buys it donates the papers to Bletchley Park."

Peter Barron, Google's director of external relations, yesterday said the company was "delighted" that Turing's work would be returning to Bletchley Park.

"Turing is a hero to many of us at Google for his pioneering work on algorithms and the development of computer science," he said.

The papers will go on public display later this year following conservation work by the NHMF.

The Manchester University scientist committed suicide in 1954 at the age of 41, two years after being chemically castrated following a criminal prosecution for having a sexual relationship with a man.

In 2009, the then prime minister Gordon Brown was forced to apologise on behalf of the government for Turing's "appalling" treatment after an online petition gained thousands of signatures.