In line with this development the treatment of prisoners of war became increasingly regulated in interactional treaties, particularly in the form of the so called cartel system, which regulated how the exchange of prisoners would be carried out between warring states. Another such treaty was the 1648 Peace of Westphalia, which ended the Thirty Years' War. This treaty established the rule that prisoners of war should be released without ransom at the end of hostilities and that they should be allowed to return to their homelands.