A suspected double agent has gone on trial for treason in Germany on charges of betraying secrets from the country's intelligence service to both the US and Russia.
Markus Reichel, a former employee of the BND intelligence service, confessed in court to passing secrets to the CIA over a period of six years.
The 32-year-old said he had been motivated by a desire for greater recognition.
"In the BND I had the feeling no one thought anything of me," he told the court. "With the CIA it was different. There you could prove yourself."
Mr Reichel's arrest last year strained relations between Germany and the US, with Angela Merkel's government asking the then CIA station chief in Berlin to leave the country.
The prosecution alleges he handed over "scores of documents and internal communications" to the CIA in exchange for payments of some euros 95,000 (pounds 66,000) over a period of six years.
He is also accused of passing three secret documents to Russian intelligence at the country's Munich consulate.
He was allegedly indentified in a sting operation after German intelligence intercepted an email he sent to the Russian embassy offering to sell classified information.
The BND was reportedly puzzled when it received no reply to a request it sent the Americans asking for help identifying the mole.
It was only after his arrest that Mr Reicel allegedly confessed that he had been passing secrets to the CIA since 2008.
He had started working at the BND the previous year. Partially disabled because of a a botched vaccination in his childhood, he suffers from shaking hands, poor coordination and a speech impediment, and had previously struggled to find work, the court was told.
He was employed in a junior position in the BND mail room at a monthly salary of of euros 1,200 (pounds 840) after tax.
He told the court his work only occupied him for two or three hours a day, and he spent the rest of the time "reading the newspaper, drinking coffee and gossiping".
He applied several times for a position in the BND technical operations support department without success.
But his role in the mail room gave him access to classified information which he was able to sell to the US and Russia.
The court has ordered a psychiatric evaluation.
If convicted of treason, Mr Reichel could face life imprisonment.
The case continues.