Two distinct realms of self‑defense exist within the law of war. One is the justification for going to war in the first place; the second is the use of force in combat in the course of war, such as killing civilians who are attacking soldiers.