And over time, as codes of law sought to control violence within groups, so did philosophers and clerics and statesmen seek to regulate the destructive power of war. The concept of a "just war" emerged, suggesting that war is justified only when certain conditions were met: if it is waged as a last resort or in self-defense; if the force used is proportional; and if, whenever possible, civilians are spared from violence.