Abdul Hamid S, who was working as a linguistic and cultural adviser with the German army, "is believed to have passed insights to an Iranian intelligence agency," prosecutors say.
Germany on Tuesday arrested a German-Afghan man on suspicion he was spying for Iran while working for the German army as a linguistic and cultural adviser.
The 50-year-old identified as Abdul Hamid S was arrested in western Germany, federal prosecutors said in a statement.
"Abdul Hamid S is strongly suspected of having worked for a foreign intelligence agency. The suspect was a language expert and cultural adviser for the Bundeswehr. In this capacity, he is believed to have passed insights to an Iranian intelligence agency," it said.
According to Spiegel Online, he is suspected of working for Iranian secret services for several years.
While working for the German army, he had access to highly sensitive information including on troop deployment in Afghanistan, the report added.
Previous cases of espionage
Previous cases of infiltration by a foreign agency have sparked outrage and shock in Germany.
In 2016, Markus Reichel, himself a former intelligence agent for Germany, was convicted for spying for both the CIA and the Russian secret service.
He admitted handing over "scores of documents and internal information" to the CIA, including papers detailing Germany's counter-espionage strategies.
Reichel also delivered three classified documents to the Russians.
In 2011, Germany jailed a married couple for spying for the Russian secret services for more than 20 years.
The pair, identified only by the code names Andreas and Heidrun Anschlag, were planted in the former West Germany from 1988 by the Soviet Union's KGB and later worked for its successor the SVR.
The couple had obtained NATO and EU political and military secrets, focused especially on the relationship of NATO and the EU with eastern European and central Asian countries.