Shamash, the Babylonian sun god, was their god of law and justice and as that he was said by the Babylonians to have given mankind their laws.
In ancient Babylon including the time of Hammurapi (1792-1760 BC), there were many and varied punishments for crimes. For most serious crimes the punishment was death. This was done in many ways with two of the most common being by drowning or burning. Also used were mutilations. Typically a part of the body, such as hands or ears were cut off. Most minor crimes, however, tended to be punished by a fine.