THE extraordinary exploits of a psychologist whose daring raid on Hitler's mountain retreat helped win the Second World War have been unearthed.

Dr Oscar Oeser, who was once based at St Andrews University, was a code-breaker during the war.

Under the command of James Bond author Ian Fleming, he went on to lead the raid that was vital to the intelligence war, and later headed a de-Nazification unit in Germany after VE Day.

The "unsung hero" was never able to tell people of his involvement in the war effort as most of his activities were classified at the time, with little information released after his death.

However, his undercover past has been brought to light thanks to another former St Andrews University academic - Alan Kennedy, now emeritus professor of psychology at Dundee University.

Mr Kennedy came across the name of Oscar Oeser - his former colleague and predecessor - while researching material for a novel to be set in wartime France.

Born in 1904 in Pretoria, South Africa, Mr Oeser was the eldest of three children of German-born Alfred Edward Oeser.

Oscar Oeser had achieved degrees in physics and maths before he was 21 and completed a doctorate in psychology at Marburg University in Germany, and a second doctorate at Cambridge.

He was one of the first to study the psychological effects of unemployment and led a three-year survey of Dundee's youth in the 1930s, reporting on their economic deprivation and the harsh treatment they received at school.

In 1940, Mr Oeser was recruited to work as a code breaker at the Bletchley Park intelligence centre. Bilingual in English and German, he became head of a section translating and interpreting deciphered German Air Force messages.

In May 1945 he was recruited by Fleming to lead a commando raid on Hitler's "Eagle's Nest" retreat in the mountains near Berchtesgaden, Germany, where several Lorenz cipher machines had been hidden.

Mr Oeser's raid captured seven tons of German cryptographic equipment. Among the haul was a top-secret machine known as the Russian Fish, used by the Germans to decode Soviet signals.

Mr Oeser brought this to Bletchley Park under conditions of great secrecy and it was used to intercept Russian signals during the early days of the Cold War.

From 1945 to 1946 Mr Oeser was in command of the British de-Nazification Bureau in Germany. He used psychological and psychiatric tests to weed out those people considered too dangerous to work in the new civil state in Germany.

He spent the rest of his life in Melbourne, Australia, where he was the founding head of the department of psychology.

Professor Kennedy said: "I was appointed to a lectureship in St Andrews in 1965 - the same post Oeser held 30 years earlier. Prior to that, I had been in Oeser's department in Melbourne.

"I got to know him quite well, but none of us knew much about his wartime exploits. Most of his activities were classified at that time and little was officially released until after his death in 1983.

"The details of his raid on Hitler's Eagle's Nest were only declassified a few years ago. His team was in fact the first allied force to reach the place.

"Few psychologists know about him now, but Oeser really was an unsung hero - an exceptionally clever man who helped win the war. And his post-war work in Germany also helped win the peace."

The extraordinary story is contained in Mr Kennedy's book Oscar & Lucy - An Autobiographical Biography, published by Lasserrade Press.