The lodger was well-suited and booted and, with his background as a GP, just the person that Edinburgh landlady Agnes McLeod was happy to have take up temporary residence in her Morningside home.

German-born Armgaard Karl Graves had arrived in the Capital in January, 1912, and, having left his medical practice in Australia, was now intent on attending medical lectures at Edinburgh University and taking on a role as a locum.

Nice enough – he was said by one local who met him on several occasions to be “interesting and entertaining” - there seemed little about the softly spoken German to arouse suspicion.

But this was in the febrile years before the First World War, a naval arms race had sparked mutual suspicion between Germany and Britain, and the newly formed British Secret Service Bureau was on high alert for anyone with ulterior motives.

To add to the mix, the Admiralty had ordered the construction of new warships from Clydeside shipyards, and work was underway on a new dockyard at Rosyth.

With new arms being developed, new tensions arose. Nervousness even spilled over into popular fiction: a bestseller of 1909 was “Spies of the Kaiser” by William Le Queux, which featured German agents spiriting away the secrets of the new Fife naval base.

Soon Mrs McLeod – and more than a few others – would be looking at Armgaard Karl Graves, who turned out to be more 'Dr No' than real GP, through fresh eyes.

And before the year was done, he would be the first person to stand trial in Scotland accused under the new Official Secrets Act 1911 of being a spy.

As it happened, he was a rather hapless secret agent: despite efforts to squirrel his way into Edinburgh life while sending information about fleet manoeuvres, arms and equipment at Rosyth and the Cromarty Firth back to his spymasters, he was on already on the radar of authorities from the moment he set foot on British soil.

It didn’t help that he openly carried a handbook of the world's navies and ships wherever he went, and often discussed German naval issues with people he met.

Indeed, such was his apparent lack of ability to follow the first rule of spying – namely, don’t blow your cover - even Agnes rumbled him.

Her German lodger, she warned local police was a spy.

As it turned out, Graves was far from the only German spy operating in Scotland at the time.

Such was fear over the enemy in the midst, that newspaper headlines told of a ‘spy mania’ among fearful Scots who, with best intentions, sometimes managed to point fingers at entirely innocent neighbours… For fans of a good spy tale, the festive period brings a flood of James Bond thrillers, including on New Year’s Day, when No Time to Die receives its television premier.

While ITV’s new streaming service, ITVX, has just unveiled two new spy dramas. A Spy Among Friends tells the true story of spies Nicholas Elliott and Kim Philby, starring Damian Lewis, Guy Pearce and Anna Maxwell Martin, while, launched last week was Scots actor David Tennant as former Russian spy, Alexander Litvinenko, in a four part drama of how he ended up poisoned with the radioactive isotope polonium-210.

All of which may sound far more thrilling than the seemingly mild-mannered Graves, with his doctor’s notebooks, stethoscope and apparent interest in skin diseases.

He had already caught the attention of German intelligence officers when, just 16 years old, he had fled Australia amid accusations of theft and harassment and returned to Germany. Within a few months, he had been convicted of fraud only to go on the run before serving his sentence.

His slippery character was perfect for what they had in mind.

Graves struck a deal with the Kaiser’s naval spymaster, Albert Tapken, known as ‘N’. He would avoid jail in return for adopting a fake identity and a spell in Edinburgh where, for £15 a month, he would feed back information to the Admiralstab in Berlin.

In his sights was the new Rosyth dockyard, naval movements in the Cromarty Firth and at Scapa Flow, and Beardmore & Co, a Parkhead works in Glasgow charged with making new guns.

He took lodgings with Mrs McLeod and her son, William, at 25 Craiglea Drive, and set about feeding information back to his spy chiefs.

But unfortunately for Graves, spying was not his forte and soon she – and others – were suspicious.

He didn’t exactly cover his movements well: at one point he lodged a complaint with the Royal Mail when he suspected his coded letters were going astray.

In fact, they were being intercepted by agents from the newly formed Secret Service, who had been watching him for months.

Agents were on his tale when he arrived at Glasgow’s Central Hotel, where he planned to base himself while he gathered information about the Beardmore & Co’s work.

They swooped, and did not have to look far for damning evidence.

Graves was found with a book giving the history of the Forth Bridge – sparking fears it might be a target for German bombs - a map of Rosyth naval dockyard and what ¬appeared to be a doctor's notebook.

Inside two pages that had been stuck together were codes for sending his messages about British warships, fortifications, naval bases and supply depots.

Also in his possessions were phials filled with deadly poisons, hypodermic needles, and rifle cartridges.

Graves stood trial and was sentenced to 18 months in jail.

However, he almost instantly struck another deal with the British agents to return to Berlin where he would supply them with a list of German spies – making him one of the first double agents in modern history.

That, however, never happened. In a lesson to the British agents to ‘trust no-one’, the seemingly feckless spy took their money and fled to America, where he published a book telling his story and fuelling fears over spies even more.

Evidence of his underhand dealings is held at National Records of Scotland, which has told his story in an online exhibition, which includes fascinating detail of his trial and events before and after his capture. A spokesman said: “The story of Dr Armgaard Karl Graves, a German-born double agent and the first person in Scotland to be tried for offences under the Official Secrets Act, is one of the more dramatic and intriguing tales you can find in National Records of Scotland’s (NRS) archive collections.

“NRS has an extensive collection of material from Graves’ trial, including detailed accounts of his movements, witness statements, and a code books that reveal his covert activities observing British warships, fortifications and naval bases.”

“We also hold more personal documents, such as a pawn ticket found on Graves’ person bearing the name ‘Max Meincke’ – perhaps his real name?”

The National Records of Scotland website has more about The Kaiser’s Spy in Scotland: https://www.nrscotland.gov.uk/research/learning/first-world-war/the-kaisers-spy-in-scotland-naval-espionage-before-the-great-war Tie piece The threat posed by spies in the years leading up to the First World War caused fear across Scotland.

At a meeting in Dundee in 1910, locals were warned by a Colonel Seton – thought to be Capt. V.G.W. Kell, boss of the newly formed British Secret Service Bureau - of a dangerous German spy network taking photographs of submarines and monitoring troop movements. A few years later, German spy Carl Lody was in Edinburgh, operating under the alias of Charles Inglis.

He sent telegrams and letters to an agent in Stockholm, some of them containing information deliberately planted by British agents intended to mislead.

He was arrested, charged with spying for Germany and executed by firing squad at the Tower of London in November 1914.

Around the same time, ‘spy mania’ was gripping Scotland, leading to the entire staff of Lerwick Post Office being arrested on suspicion- wrong, as it happened - that secret correspondence for the Fleet was being tampered with.

Read more about the Lerwick arrests at www.nrscotland.gov.uk/research/learning/first-world-war