Mathematician who helped break Enigma codes at Bletchley;

Mathematician who helped break Enigma codes at Bletchley;

Born: May 29, 1918; Died: August 16, 2013.

David Rees, who has died aged 95, was a mathematician who helped crack one of the German's Enigma codes during the Second World War. He was always modest about the achievement - and once even claimed that he was out of the building when the breakthrough was made - but it was his work on shortcuts being used by the German operators that led to the breaking of the Red code used by Luftwaffe officers communicating with ground troops.

Professor Rees always loved mathematics - when he was a child, his mother would bring back books on the subject from the library and, with his brother, the young David would pore over them. He grew up in Abergavenny where he attended King Henry VIII Grammar School before going up to Cambridge. He was doing postgraduate research there in 1939 when his supervisor Gordon Welchman was seconded to Bletchley Park, the codebreaking centre in Buckinghamshire. Mr Welchman recruited his student and a number of other promising young mathematicians from Cambridge and they were set to work on attempting to break the Enigma codes.

The team at Bletchley had the use of an early Enigma machine which had been acquired by the Polish resistance and at first, without the use of computers, the work was a hard slog. John Herivel, another of Welchman's recruits, had speculated that some of the machine's German operators might use shortcuts which could be exploited by the Bletchley team.

In May 1940, Mr Herivel's theory bore fruit while Prof Rees, who was working in the famous Hut 6, was on the nightshift. As Germany invaded France, he noticed the clusters that Herivel had predicted and used them to break the Red code. The breakthrough sparked immediate celebration in the hut. Stuart Milner-Barry, who was deputy head of Hut 6, said the men stood on chairs cheering and waving papers in the air. They knew the importance of what they had achieved.

Professor Rees was not so sure about his contribution, although Mr Herivel was clear that it was his colleague who made the breakthrough. Prof Rees said he remembered that he had returned from leave to go into the night shift and was told that the code had been broken, although he was speaking about 60 years after the end of the war and admitted his memory could be fault.

After the war, Prof Rees joined Manchester University as an assistant lecturer in mathematics before returning to Cambridge as a lecturer in 1949. His speciality was algebra and in particular semigroup theory and commutative algebra.

In the early 1950s, he joined Exeter University as professor of pure mathematics and remained there for the rest of his career. He was elected a fellow of the Royal Society in 1968 and served as a member of its council from 1979 to 1981.

His wife Joan died less than two weeks after him. He is survived by his four daughters.