Tributes have been paid to Ann Mitchell - one of the last of a World War Two code-breaking team at Bletchley Park - who has died aged 97.
Mrs Mitchell, who deciphered German codes at the British code-breaking centre from 1943, died at an Edinburgh care home on Monday.
Her family and friends said she had been declining in health for some years and had "a life well lived".
The Scotsman reported she had tested positive for Covid-19 recently.
Her son Andy Mitchell, 61, told BBC Scotland: "She was a loving mother and it's very sad but she was declining in old age with memory loss and physical frailties.
"I'm pleased she has been given the recognition for a life well lived."
When Mrs Mitchell was called up for war service in 1943 in the Foreign Office, "she had no idea what kind of job she was accepting", her son said.
The Oxford mathematics graduate spent the next two years at Bletchley Park in Buckinghamshire, cracking the secret Enigma messages sent by the Germans.
Later in life, her pioneering research into the effects of divorce on children influenced changes to Scots law.
Born in Oxford, she moved to Edinburgh more than 20 years ago.
"My headmistress firmly told my parents that mathematics was not a ladylike subject," she once said.
"She herself taught chemistry, which was surely even less ladylike. However, my parents overruled her and I pursued my chosen path."
She was one of only five women accepted to read maths at Oxford University in 1940.
During her time at Bletchley Park, Mrs Mitchell was assigned to "hut 6", one of the many single-storey buildings in the grounds, where she was initiated into the secret world of code breaking.
She remained until the end of the war in the hut 6 machine room, so called because it had a number of British-made deciphering machines,
Hut 6 dealt with the high priority German army and air force codes, most important of which was the "Red" code of the Luftwaffe.
As the war came to a close, the number of messages declined until there were no more.
"I did go up to London for VE Day on 8 May 1945 but I remember very little about the celebrations," she said.
Sworn to secrecy
The codebreakers of Bletchley Park returned to normal life and, having signed the Official Secrets Act and sworn not to divulge any information about her work, Mrs Mitchell never told anyone, not even her husband, about her wartime role.
She was therefore "amazed", in the 1970s, to find that books were being published about Enigma.
Once the secret was out she was "delighted" that she could now talk about her life during wartime and gave illustrated talks around the country. She featured in the book The Bletchley Girls.
She once said: "It was a fillip towards the end of my life, suddenly to have risen in importance, to go from being a nobody to a somebody.
"A whole past that nobody was interested in and suddenly lots of people are. It's very strange."
Dr Tessa Dunlop, author of The Bletchley Girls, said: "Ann was a rare breed. I remember the archivist at her Oxford University college sending me her CV - in an era when women often didn't work it made for intimidating reading.
"Yet to meet and speak to Ann was an enlightening and joyful experience. A wife and mother-of-four she combined gentle empathy (hence her later sterling work in the marriage guidance arena ) with extraordinary acuity.
"It was the latter quality which Bletchley Park would benefit from during the war. The vast majority of the thousands of women who worked there were just out of school, cogs in a much bigger code breaking factory, but Ann was a maths graduate whose numerical dexterity was put to good use in hut 6.
"Ann's main task was to compose the 'menus' for bombes (the testing machines designed to find enigma codes).
"It was a pressurised job that suited her temperament. Ann let me read her diary... it was a wonderful testimony to a young girl who came of age in an era which briefly defied gender norms to staff a giant secret war machine, Ann grasped the opportunity that presented with both hands.
"The park were lucky to have her."
Sally Jameson, 86, became good friends with Mrs Mitchell when she moved to Edinburgh 22 years ago.
She said: "My husband and I made friends with Ann when we joined the St John's Church in Edinburgh.
"She was awfully kind to us. We loved the old lady, she was a dear.
"We met up with her on all sorts of occasions, she was a lovely person. She was terrific and did such a lot. She also did her marriage guidance and was terribly good at that."