A Munich judge declared the 32-year Markus R. (pictured above) guilty of treason and breach of official secrets, handing out a prison term of eight years on Thursday.

The former BND employee agent was charged with selling over 200 confidential documents to the CIA between 2008 and 2012, and receiving at least 80,000 euros in return. Most notably, Markus R. stole a file listing thousands of German agents abroad, including both their cover names and their real identities.

He also contacted the Russian consulate in Munich in the summer of 2014, and delivered three BND-documents to them. Agents from Germany's domestic intelligence service intercepted the correspondence and used it to set a trap.

The authorities arrested Markus in July 2014, in the wake of the NSA scandal sparked by revelations that American agencies spy on the top German politicians.

During the trial, the accused apologized for his actions and said he was motivated by boredom and frustration at his workplace in BND, as well as "lust for adventure."

"At the BND, I had the impression that no one trusted me with anything," he told the court, "but the CIA was different. You had the opportunity to prove yourself."

Ahead of the Thursday verdict, his lawyers urged the court to be mild, saying that the former BND employee saw the sale as a "tense game, akin to cops and robbers."