Trial by ordeal has existed in polytheistic cultures as far back as the Code of Hammurabi and the Code of Ur-Nammu, and in animist tribal societies, such as the trial by drinking "red water" (calabar bean) in Sierra Leone. There the intended effect is magical rather than calling forth justice from a god. 