They were accused of 'spying' for a foreign government.
a 'spy' camera/plane [=a camera/plane used for spying]
a 'spy' novel/thriller [=a novel/thriller about spies]
(..) and of course... if not for this war... If you don't mind... why did you want to desert? I see... Torment, doubts... That's interesting... Of course... yesterday's spies. That was fast. The general is not playing around. Well done. What beautiful weather. Hey, sergeant! (..)1965 Forest of the Hanged
(..) and what's most important is that there are hungarians among them, under the pretences that they wanted to work their lands, showed up in the line of fire. Everywhere there are spies. of them. Beautiful number. apostles. Excuse me. Please, save me this. I refuse. Talk with his excellency. (..)1965 Forest of the Hanged