One of the first instruments of modern international law was the Lieber Code, passed in 1863 by the Congress of the United States, to govern the conduct of US forces during the United States Civil War and considered to be the first written recitation of the rules and articles of war, adhered to by all civilised nations, the precursor of international law.
This led to the first prosecution for war crimes—in the case of United States prisoners of war held in cruel and depraved conditions at Andersonville, Georgia, in which the Confederate commandant of that camp was tried and hanged, the only Confederate soldier to be punished by death in the aftermath of the entire Civil War.
Under article 38 of the Statute of the International Court of Justice, international law has three principal sources: international treaties, custom, and general principles of law.
In addition, judicial decisions and teachings may be applied as "subsidiary means for the determination of rules of law".
For states not party to such treaties, the work of the ILC may still be accepted as custom applying to those states.
General principles of law are those commonly recognized by the major legal systems of the world.
The sources of international law applied by the community of nations to find the content of international law are listed under Article 38.1 of the Statute of the International Court of Justice: Treaties, customs, and general principles are stated as the three primary sources; and judicial decisions and scholarly writings are expressly designated as the subsidiary sources of international law.