Some soldiers (both commanders and their troops) have always behaved atrociously in war-time. (Take a look at the Old Testament.) Certain kinds of self-restraint in wartime grew up as a form of self-preservation. You didn’t want to establish a policy of the victor slaughtering the vanquished if you might lose the next battle. Still, there were always exceptions to such self-restraint. People of different social groups within your own society or different races outside your society could not expect such treatment. Neither European Americans nor Native Americans were much inclined to give the other side quarter.
This began to change during the 18th Century. The Enlightenment established the idea of Humanitarian action. Many Europeans and Americans turned against traditional practices like the use of torture as part of a judicial inquiry, human slavery, and the intolerance of religious difference. Then the 19th Century witnessed a number of important reforms: compulsory, free public primary education, and the construction of sewer and clean drinking water systems to conquer diseases are two examples of these reforms. The same effort to make human life better appeared in warfare. The International Red Cross exemplified this trend.
The new mood led to international agreements (conventions) governing the conduct of war. The First Geneva Convention (1864) defined the proper treatment of wounded and sick soldiers. Forty thousand wounded soldiers had been left lying around the battlefield at Solferino. The Hague Convention (1899) banned bombing from the air, the use of poison gas, and dum-dum bullets. The Second Geneva Convention (1906) extended the First Geneva Convention to cover sailors in navies. While the first two Geneva Conventions were generally observed by all countries that fought in the First World War, they often were violated in the Second World War and the Hague Convention has been widely ignored in greater or lesser degree.
The Allies were outraged by the behavior of the Central Powers during the First World War. An effort was made to prosecute Ottoman leaders and commanders for the “crime against humanity” of the Armenian genocide. This failed because of the obstruction of the Turks. Also after the First World War, the British and the French tried to prosecute some German leaders for the way in which Germany had conducted war. The Versailles Peace Treaty required Germany to turn over a number of military and civilian officials for trial by a military tribunal of the victor powers. The Dutch refused to turn over the Kaiser (who had abdicated in November 1918) and the Germans refused to extradite the men demanded by the Allies. Instead, a handful of lesser figures were tried at Leipzig in 1921, mostly on charges of mistreating prisoners. The Kellogg-Briand Pact (1928) renounced “aggressive war as an instrument of national policy.” This made war a “crime against peace.” Germany signed. The Third Geneva Convention (1929) set rules for the treatment of prisoners of war.
In January 1942 British, American, and Russian lawyers began writing a law that would allow the punishment of Germany’s leaders once Germany had been defeated. At the Teheran Conference (November 1943), the irrepressible Joe Stalin suggested shooting 50,000-100,000 German officers and letting it go at that. After the Moscow Conference (later in November 1943), the Allies announced that Germans who had committed atrocities would be sent to those countries where they had committed the crimes for trial, while the top leaders would be judged by the Allies. Germany surrendered in May 1945. In August 1945 the victors announced the terms of the trials. In addition to all those to be tried for “war crimes” as then understood, the Nazi leaders would be tried for “crimes against humanity” (see: Armenian genocide) and “crimes against peace” (see: Kellogg-Briand Pact). This set the stage for the Nuremberg Trials.