Richard Hayes- Librarian and Nazi Code Breaker

Richard Hayes ran the National Library of Ireland and broke Nazi codes

Librarian by day, Nazi code breaker by night, this is not a comic book fantasy but the true story of Richard Hayes, who was director of the National Library of Ireland while breaking some of the most difficult to crack German codes of the second world war.

Any existing photos of him show the quintessential librarian- sharply dressed and serious, looking the picture of diligence. Behind this lay the man who helped shorten the war by deciphering codes which allowed Allied forces to interfere with the Nazi war effort.

He was so good at his job that the British Intelligence Service MI5 called him Irelands greatest unsung hero…… whose gifts amounted almost to genius.

Richard Hayes was born Abbeyfeale County Limerick in 1902 and graduated with a degree in languages from Trinity College Dublin. He joined the National Library in 1923 and worked as its director from 1940 to 1967.

You may wonder how Ireland’s highest ranking librarian became a key part of Allied war intelligence.

Unbeknown to most Dublin was a major centre of espionage during the war and coded messages were found to have originated from amongst other places the German embassy. Ireland’s leader Eamonn DeValera, a mathematician himself, knew the importance of breaking these codes so a small team was set up headed by Hayes. A skilled linguist who had previous success breaking codes for Irish intelligence, Hayes was the best person for the job.

One of the team was Kevin Boland, son of the then minister for justice. They had to be so secretive about their operation that younger Boland was forbidden from telling his father about their work.

Alongside his new role with intelligence Hayes continued his work with the National Library so lead quite a busy life during world war two. Despite this he remained a devoted family man who always found time for his children. This downtime may even have helped because he had a breakthrough in cracking one German code while helping his eldest daughter Joan with her maths homework. The equation he scribbled down on a copybook can be seen today in the Hayes collection in National Library.

Hayes sometimes used his children’s copybooks to decipher codes

Hayes’ work resulted in him cracking the Görtz code, regarded by the British Intelligence Service MI5 as one of the best three or four in the war.

The Görtz code was particularly well encrypted and deciphered by Hayes in 1943. A similar code had stumped cryptologists at Bletchley Park, the headquarters of UK code breaking, but Hayes figured it out.

The code originated with Hermann Görtz, the highest ranking Nazi spy to be captured in Ireland. Görtz had parachuted into Ireland in full Nazi uniform in 1940, standard practice at the time because he could have been shot as a spy if he had been in civilian clothes.

He moved between safe-houses and became a minor celebrity on the social scene until his capture in November 1941. Following his arrest, he was sent to Arbour Hill prison in Dublin and Hayes visited often, striking up a friendly relationship but still unable to extract useful information regarding the code.

Hayes knew that coded messages were being sent out of the prison on Görtz behalf, but he didn’t know by who or where he stored the codes, that was until he saw a bulge of papers in the Germans’ back pocket.

Görtz complained of pain from an ulcer which had previously afflicted him and Hayes organised from him to be sent to hospital for an X-Ray. Hayes arrived at the hospital in secret before Görtz and hid in the doctor’s quarters. When he undressed and went for his X-Ray Hayes photocopied the papers in his back pocket and set about deciphering the code.

Hermann Görtz used a code that was very difficult to decipher

With the code broken intelligence began using it to their advantage, intercepting what Görtz sent to Germany and replying so that he thought all was well and continued working the way he did. These replies sent from the Irish pretending to be Germans praised Görtz for his work and even promoted him!

After cracking the codes it meant that misinformation could be spread through German intelligence about Allied plans and information gathered about German tactics. Crucial campaigns such as the D-Day landings and the Allied victory at the Battle of the Bulge were in large part down to men like Hayes who worked in secret and ultimately brought the war to a more rapid conclusion.

Görtz was released at the end of the war but committed suicide in 1947 when officials informed him of his imminent deportation to Germany. Curiously he was buried with a handstitched Nazi flag draped over his coffin while dressed in his Nazi uniform.

After the war Hayes returned full-time to his role as head of the National Library until his retirement in 1967. He then took over as head of the Chester Beatty Library in Dublin until shortly before his death in 1976, his place in Irish history almost forgotten until recently, when a radio documentary and a book about his life were released by Marc McMenamin. Links can be found below.

A quiet man, Hayes didn’t court attention and happily to return to his day job not bringing his story to the fore. However, US military intelligence still regard him as one of the most important code breakers of the time without whom the war would have been prolonged.

https://www.rte.ie/culture/2022/0203/1277666-documentary-on-one-richard-hayes-nazi-codebreaker/

https://www.amazon.co.uk/Code-Breaker-untold-Richard-librarian/dp/0717181618