Related Rule
Netherlands
Practice Relating to Rule 107. Spies
Section B. Status of spies
The Military Manual (1993) of the Netherlands states:
A member of the armed forces who falls into the hands of the adversary while engaged in espionage has no entitlement to the status of prisoner of war; he can be treated as a spy … Military spies, who rejoin their forces after having accomplished their task and are subsequently captured, must be treated as prisoners of war and no longer be convicted for their earlier spying activities … A spy caught in the act may under no circumstances be sentenced without trial. 
Netherlands, Toepassing Humanitair Oorlogsrecht, Voorschift No. 27-412/1, Koninklijke Landmacht, Ministerie van Defensie, 1993, pp. III-5 and III-6.
The Military Manual (2005) of the Netherlands states:
0321. Military spy status
A member of the armed forces of a party to a conflict who falls into the other party’s hands while spying is not entitled to prisoner-of-war status. He may be treated as a spy. This therefore constitutes an exception to the rule that a captured combatant has prisoner-of-war status. If, however, the military spy returned to his own troops after fulfilment of his mission, and is captured later, the enemy must treat him as a prisoner of war. He may no longer be convicted of his previous acts of espionage.
0322. International law does not prohibit espionage. A spy is therefore not guilty of infringing the rules of the humanitarian law of war. It also goes without saying that every State makes espionage punishable under its own national legislation. In the Netherlands, this has been done in the Criminal Code, in the section on “Offences against State Security.” A spy caught in the act may in no case be punished without due process. 
Netherlands, Humanitair Oorlogsrecht: Handleiding, Voorschift No. 27-412, Koninklijke Landmacht, Militair Juridische Dienst, 2005, §§ 0321–0322.
The manual further states:
A captured non-military spy has no right to prisoner-of-war status. A member of the armed forces of a party to the conflict who falls into the adversary’s hands while engaging in espionage also has no right to the status of prisoner of war. This is an exception to the rule that a captured combatant has the status of a prisoner of war. However, if a military spy has returned to his own side on completion of his mission, and is later captured by the enemy, he must be treated as a prisoner of war and may no longer be convicted for his earlier espionage (see also … AP I [1977 Additional Protocol I] Article 46). 
Netherlands, Humanitair Oorlogsrecht: Handleiding, Voorschift No. 27-412, Koninklijke Landmacht, Militair Juridische Dienst, 2005, § 0706.