WASHINGTON — Mavis Batey was a British student of 19, midway through her university course in German Romanticism, when she was recruited for a top-secret assignment during World War II.
‘‘This is going to be an interesting job, Mata Hari, seducing Prussian officers,’’ she years later recalled thinking. ‘‘But I don’t think either my legs or my German were good enough because they sent me to the Government Code and Cipher School.’’
In May 1940, Mrs. Batey — then the unmarried Mavis Lever — joined the team of code breakers at Bletchley Park, the British cryptography headquarters. Trained in the enemy’s language and endowed with a facility for words, she became a key contributor to a wartime project that remained classified for decades. But by the time of her death on Nov. 12 at 92, Mrs. Batey was regarded in England as a national heroine. Working with Alfred Dillwyn ‘‘Dilly’’ Knox and other celebrated code breakers, she learned to decipher what she called the ‘‘utter gibberish’’ of encrypted German communications.
In recent years, with the release of British wartime records, it was revealed that her code-breaking helped the Allies cripple the Italian navy in 1941 and assisted the 1944 Normandy invasion.
Her first major contribution came in March 1941, when she helped decipher Italian communications revealing an impending attack on British ships ferrying supplies from Egypt to Greece. One message declared the arrival of ‘‘day X minus 3.’’
‘‘Why they had to say that I can’t imagine,’’ Mrs. Batey later said, according to the Daily Telegraph. ‘‘It seems rather daft, but they did.’’
She was the cryptographer on duty to decode a subsequent message explaining in excruciating detail the Italian battle plans. The Battle of Cape Matapan was a decisive victory for the British.
Mrs. Batey also helped crack the even more complex Enigma codes employed by the Abwehr, the German military intelligence service. ‘‘I used the psychological approach,’’ she told the Telegraph. ‘‘To test the day’s settings, the Germans sometimes used their girlfriends’ names and dirty words; it was a great shame when they were stopped, as we enjoyed the dirty words.’’
By penetrating Abwehr communications, Mrs. Batey and her colleagues helped confirm the success of the XX, or Double-Cross, an anti-espionage operation in which captured Nazi spies were used to transmit false information to the Axis.
The deceptive tactics were used throughout the war — most notably to fool Germans into believing that the D-Day invasion would take place not in Normandy, but at the Pas-de-Calais. Bletchley Park decoders confirmed that the ruse had worked, and that the Allies could count on the relative security of their plan.
Mrs. Batey steadfastly emphasized the heroism of others, including Polish code breakers who had made significant contributions, and the ‘‘chaps’’ who stormed the beaches of Normandy.