Civilians are all persons who are not combatants or other members of the armed forces. They enjoy general protection from the dangers of military operations and may not be made the object of attack. This protection is enshrined in Geneva Convention IV and, where applicable, Additional Protocol I (AP I).
However, civilians lose their protection “for such time as they take a direct part in hostilities” (AP I, art. 51(3)). According to the International Committee of the Red Cross (ICRC), direct participation requires three elements: (1) the act must be likely to harm a party’s military operations, capacity, or protected persons/objects; (2) there must be a direct causal link between the act and the expected harm; and (3) the act must be specifically designed to cause such harm in support of one party and to the detriment of another.
Thus, civilians are protected as long as they abstain from direct participation in hostilities, but once they cross that threshold, they may lawfully be targeted for the duration of their involvement.