The ordeal of cold water has a precedent in the Code of Ur-Nammu and the Code of Hammurabi, under which a man accused of sorcery was to be submerged in a stream and acquitted if he survived. The practice was also set out in Frankish law but was abolished by Louis the Pious in 829. The practice reappeared in the Late Middle Ages: in the "Dreieicher Wildbann" of 1338, a man accused of poaching was to be submerged in a barrel three times and to be considered innocent if he sank, and guilty if he floated.