A scientific notebook compiled by World War Two codebreaker Alan Turing has sold for $1m in New York.
It is one of very few manuscripts from the head of the team that cracked the Germans' Enigma code.
The handwritten notes, dating from 1942 when he worked at Bletchley Park, were entrusted to mathematician Robin Gandy after Turing's death.
The notebook was sold at Bonhams for $1,025,000 (£700,850) to an unnamed buyer.
Alan Turing: Creator of modern computing
- After September 1939 Turing developed a new machine capable of breaking Enigma messages on an industrial scale. Turing's cryptanalysis of Nazi codes contributed to many Allied victories against their militia, saving countless lives.
- In March 1946 Turing produced a detailed design for what was called the Automatic Computing Engine (ACE).This was a digital computer in the modern sense.
Mr Gandy deposited Turing's papers at the Archive Centre at King's College in Cambridge in 1977.
But Mr Gandy retained the 56-page notebook because of a deeply personal message written in the blank centre pages of the notebook which he wanted to keep private.
The notes remained hidden among personal effects until after his death.
Scholar Andrew Hodges, said: "Alan Turing was parsimonious with his words and everything from his pen has special value.
"This notebook shines extra light on how, even when he was enmeshed in great world events, he remained committed to free-thinking work in pure mathematics."
Turing killed himself in 1954 after hormone treatment to "cure" his homosexuality which he was undergoing as an alternative to imprisonment.
The story of his life was told in the 2014 Oscar-winning film The Imitation Game.