A spy spent years collecting highly sensitive secrets to sell to the Russians for large amounts of cash, the Old Bailey heard today.
David Ballantyne Smith, 58, gathered a mass of secrets while working as a security guard in the British Embassy in Berlin.
The Scot was unmasked in a joint investigation by German police and British security services and arrested at his home in Potsdam, Germany, in August 2021.
Smith was said to be motivated by "an extreme hatred of where he works and the United Kingdom in general", the court heard.
The undercover operation began when he made an unauthorised photocopy of embassy documents along with video recordings of CCTV footage of a person known as 'Dmitry'.
Alison Morgan, KC, prosecuting said: "The operation provided the defendant with the opportunity to obtain further highly sensitive information about an individual, Dmitry, who the defendant believed to be a Russian citizen helping the UK.
"Plainly such an individual would be of obvious interest to those that the defendant was in contact with, within the Russian Embassy.
"The defendant took advantage of that opportunity, recording videos of Dmitry and obtaining other information connected with him.
"As part of the operation the defendant was approached by a further undercover operative, Irina, who posed as an agent of the Russian intelligence service, the GRU, making enquiries to see if the defendant was minded to provide sensitive information to her.
"The defendant engaged in discussions with her about the embassy."
Smith was arrested at his home on August 10, 2021.
"Following further police investigation, it was established that over a period of years, the defendant had been collecting a range of highly sensitive information from and about the Embassy with the intention of supplying it to the Russian Federation, and which by virtue of his guilty pleas, might be, directly or indirectly, useful to it," said Ms Morgan.
"In return the defendant received substantial amounts of cash."
A joint investigation by MI5 and their German counterparts found Smith had been selling classified information to Russia, including the layout of the embassy, since 2020.
Smith communicated to General Major Sergey Chukhurov, the Russian military attach based out of the Russian Embassy in Berlin, details about the activities, identities, addresses and telephone numbers of various British civil servants, between October and December 2020.
He made an unauthorised photocopy of embassy documents, kept SIM card packaging, and made video recordings of CCTV footage of Dmitry on August 5, 2021, the court heard.
The following day, Smith made further recordings of Dmitry.
Ms Morgan told the court: "The defendant denies intending to cause prejudice or any disadvantage to the UK by his actions.
"The defendant claims that his actions were intended to cause inconvenience and embarrassment to the British Embassy.
"The defendant was motivated by grievance with his employers and was suffering from mental health issues.
"The defendant denies receiving any payment for his actions.
"The defendant has provided no explanation as to why he chose to send material to the Russian Embassy in particular.
"The defendant claims that in relation to additional sensitive and secret material found in his possession, he had no settled plan as to what he would do with the material, but he could potentially have used it to cause inconvenience or embarrassment to the British Embassy and in order to expose misconduct and lack of security at the Embassy.
"Sat in very stark contrast, the prosecution's position is as follows: In terms of general ideology, the defendant expressed support of Russia and support of Vladimir Putin. He also expressed pro-Russia and pro-Putin views.
"In a letter dated 14 May 2020, the defendant indicated his intention to use his position within the British Embassy to access classified information to be provided to the Russians. His conduct thereafter was in furtherance of that intention.
"The defendant's deliberate engagement with the Russian authorities, by providing them with confidential and sensitive information, demonstrates a clear intention to cause prejudice to the UK.
"The defendant had in his possession confidential and sensitive material dating from as early as 2018. The defendant had no legitimate reason for retaining any of this material.
"It is implausible to suggest that he only took possession of material within the context of a dispute with his employers or because he intended to expose security lapses."
An SD card found at Smith's address included a significant body of images capturing the British Embassy, which the prosecution said he intended to supply to Russian authorities.
"Analysis of the defendant's financial position in 2021 shows the absence of cash withdrawals indicative of an alternative source of cash.
"Further, at the time of his arrest, the defendant was in possession of Euro 800 in cash that has no explanation. The prosecution relies on this evidence to demonstrate that the defendant was receiving cash from those to whom he was sending information.
"The letter that the defendant posted to General Major Chukrov on 17 November 2020 included a covering letter describing the information as being "a small update", suggestive of previous contact between the defendant and the General.
"Against the background of the defendant's existing engagement with Russian authorities, his interest in the visit of Dmitry, an obvious Russian speaker, on 5 August 2021 was not a coincidence.
"The defendant's decision to take documents and SIM packaging relating to Dmitry, and to capture footage of him, was within that obvious context of the defendant's existing engagement with Russian authorities and his awareness that this material would be of interest to them.
"The defendant's engagement with "Irina" on 9 August 2021, in particular his willingness to look at images of Russians of interest, was also within the context of his previous engagement with those within the Russian authorities."
Smith, originally from Paisley, Scotland, has admitted eight offences under the Official Secrets Acts 1911 and 1920, committed between May 2020 and August 2021.
The charges state he committed an act prejudicial to the safety or interest of the State and, according to guidelines, he could face up to 14 years in prison.
The guard denied a ninth like offence alleging he leaked information about embassy building repairs on 6 August 2021 and the charge is expected to be ordered to lie on file.
Mr Justice Mark Wall will sentence Smith after a week-long 'Newton' hearing on Friday.