David Smith pleads guilty to collecting intelligence and leaking secret documents while in Berlin.
A security guard has admitted spying for Russia while working at the British Embassy in Berlin.
Prosecutors alleged David Smith, 58, had wanted to hurt the UK and the embassy where he had worked for eight years.
The Briton was accused of collecting intelligence about the embassy and leaking secret documents.
Smith pleaded guilty at the Old Bailey to eight charges under the Official Secrets Act.
He is said to have wanted to live in Russia or Ukraine during the time he passed on secret intelligence from May 2020.
Prosecutors said he was driven by an intense hatred for his country and angered by the flying of the Rainbow flag in support of the LGBT community.
He was arrested in August 2021 and 800 euros (£700) of cash was found in his home in Potsdam, Germany.
Smith, now of no fixed abode, pleaded guilty to the charges on 4 November, but reporting restrictions were initially put in place. They were lifted on Friday.