Joan Williams was one of the linchpins of Winston Churchill's War Cabinet Secretariat, heading part of the small military wing within it that gave him the near-dictatorial powers to act that he saw as vital for Britain's conduct of the Second World War.
A squadron officer in the Women's Auxiliary Air Force, she took on a rapidly expanding and crucial role in 1942 when she was asked to set up a cipher office within the Cabinet Office that was quickly to become known as "Coco (Cabinet Office Cipher Office)".
Beginning with eight WAAFs coding, decoding and typing out secret messages from across the world, Coco started life as the "special signals" adjunct to the Air Ministry Cipher Office, of which Williams had up to then been in charge.
In 1943 the office, which would eventually need 48 staff, moved to the ground floor of a building off Whitehall, with an entrance in Great George Street, close to Churchill's wartime basement map room and nerve-centre of operations where the three forces' chiefs of staff thrashed out how best to channel the nation's fighting power.
"My debt to (the Secretariat's) members is immeasurable," Churchill, who assumed the post of Minister of Defence, wrote. Had it not existed, he asserted, "a process of ill-timed constitution-making" would have been needed to embody his defence job in a department of its own. Instead, most of the "delicate adjustments" necessary for decision-making in war "settled themselves by personal goodwill."
Squadron officer Williams, admitted to this elite group of public servants, set two young women at a time to work four round-the-clock shifts, scrambling, unscrambling, and copying messages with cipher machines attached to their typewriters and linked to a device so huge that it was kept in the basement of Selfridges' Oxford Street department store.
Rats infested the sub-basement where they were first installed, and their door was guarded by a security man at a locked gate who asked all comers for their passes. Williams and her "girls" rarely saw the many young gold-braided officers whose duties brought them within yards of where the women toiled in the stuffy, poison-gas-proof filtered air, polluted by the smoke from the Prime Minister's cigars and his colleagues' many tensely smoked cigarettes.
More breathing-space came with the move, in late summer 1943, to four rooms with a view over St James's Park. But it was Churchill's second serious bout of illness within 10 months that year that gave the cipher girls what Williams described as the highlight of their war.
They had a fairy-tale Christmas in North Africa after they were flown out to assist when the Prime Minister stopped there to convalesce from pneumonia. The illness, which he had also suffered the previous February, had returned while he was on his way home from the November Tehran conference with Roosevelt and Stalin.
The women's round-the-clock work was leavened with dances, luxurious hotel rooms and in Williams's words, "wonderful food with white bread at every meal". Their presence enabled Churchill, in his red and gold silk, dragon-embroidered dressing-gown, to continue issuing orders, just as in health he was also wont to do, from his bed.
Not everyone was grateful for Williams's efforts. Field Marshal Lord Alanbrooke, Chief of the Imperial General Staff, back in London, confided to his diary: "Winston, sitting in Marrakech, is now full of beans and trying to win the war from there! As a result a three-cornered flow of telegrams in all directions is gradually resulting in utter confusion!"
Williams and her group sailed home with the Prime Minister in January 1944 on the battleship HMS King George V. They then had to prepare for the D-day Normandy landings, sending out dummy messages as well as real ones to confuse the Germans.
Message traffic multiplied whenever there was an international war leaders' conference, and just as for earlier meetings in 1942 at Cairo and Moscow, the cipher staff in 1944 and 1945 had to overlap their shifts by an extra hour in the airless office in London for the meetings at Quebec, Moscow, Yalta and Potsdam. Williams herself once worked for 36 hours at a stretch.
Williams, who was appointed OBE in 1944, stayed near the heart of politics in a different capacity after the war, as the wife of a Tory MP who became a junior home office minister from 1951-52 in Churchill's last administration. David Llewellyn, whom she married in February 1950, was himself knighted in 1960.
Llewellyn was the younger brother of Sir Harry "Foxhunter" Llewellyn, Bt, the equestrian champion, and uncle of Harry's sons Dai (died 2009) and Roddy (still living) who became celebrities in the 1970s. He was MP for Cardiff North from 1950 until 1959. To his wife, Cardiff was familiar territory – her childhood family home having been Bonvilston House in the village of Bonvilston in the Vale of Glamorgan.
She was to return to England again when the couple set up home at Yattendon, near Newbury in Berkshire. She cared for her husband, who was in ill health, until his death in 1992.
Joan Anne Williams, Lady Llewellyn, cipher officer: born, Llantwit Major, Vale of Glamorgan 24 December 1916; OBE 1944; married 1950 David Llewellyn (two sons, one daughter died 1992); died Berkshire 26 November 2013.