The Code of Hammurabi (also known as the Codex Hammurabi and Hammurabi's Code), created ca. 1760 BC (middle chronology), is one of the earliest extant sets of laws and one of the best preserved examples of this type of document from ancient Mesopotamia. It was created by Hammurabi. Still earlier collections of laws include the codex of Ur-Nammu, king of Ur (ca. 2050 BC), the Codex of Eshnunna (ca. 1930 BC) and the codex of Lipit-Ishtar of Isin (ca. 1870 BC).
The Code contains an enumeration of crimes and their various punishments as well as settlements for common disputes and guidelines for citizen's conduct. The Code does not provide opportunity for explanation or excuses, though it does imply one's right to present evidence. For a comprehensive summary, see Babylonian law.
The Code was openly displayed for all to see; thus, no man could plead ignorance of the law as an excuse. Few people, however, could read in that era, as literacy was primarily the domain of scribes.
Hammurabi (ca. 1810 BCE – 1750 BCE) believed he was chosen by the gods to deliver the law to his people. In the preface to the law code, he states, "Anu and Bel called by name me, Hammurabi, the exalted prince, who feared God, to bring about the rule of righteousness in the land." In the upper part of the stela, Hammurabi is shown in front of the throne of the sun god Shamash.
The laws, which numbered from 1 to 282 (numbers 13 and 66-99 are missing), are inscribed in Old Babylonian on an eight-foot tall stela of black basalt It was discovered in December 1901 in Susa, Elam, which is now Khuzestan, Iran, where it had been taken as plunder by the Elamite king Shutruk-Nahhunte in the 12th century BC. It is currently on display at the Louvre Museum in Paris.
The code is often pointed to as the first example of the legal concept that some laws are so basic as to be beyond the ability of even a king to change. Because Hammurabi had the laws inscribed in stone, they were immutable. The sayings, "An eye for an eye" or "An arm for an arm" were created based on Hammurabi's Code.
The Code of Hammurabi was one of many sets of laws in the Ancient Near East. Most of these codes, coming from similar cultures and racial groups in a relatively small geographical area, necessarily have passages that resemble each other. The earlier code of Ur-Nammu, of the Ur-III dynasty (21st century BC), the Hittite code of laws (ca. 1300 BC), and Mosaic Law (traditionally ca. 1200 BC under Moses), all contain statutes that bear at least passing resemblance to those in the Code of Hammurabi and other codices from the same geographic area.