The Code of Hammurabi is a Babylonian legal text composed during 1755–1750 BC. It is the longest, best-organised, and best-preserved legal text from the ancient Near East. It is written in the Old Babylonian dialect of Akkadian, purportedly by Hammurabi, sixth king of the First Dynasty of Babylon. The primary copy of the text is inscribed on a basalt stele tall.
The stele was rediscovered in 1901 at the site of Susa in present-day Iran, where it had been taken as plunder six hundred years after its creation. The text itself was copied and studied by Mesopotamian scribes for over a millennium. The stele now resides in the Louvre Museum.
The top of the stele features an image in relief of Hammurabi with Shamash, the Babylonian sun god and god of justice. Below the relief are about 4,130 lines of cuneiform text: one fifth contains a prologue and epilogue in poetic style, while the remaining four fifths contain what are generally called the laws. In the prologue, Hammurabi claims to have been granted his rule by the gods "to prevent the strong from oppressing the weak". The laws are casuistic, expressed as "if ... then" conditional sentences. Their scope is broad, including, for example, criminal law, family law, property law, and commercial law.
Modern scholars responded to the Code with admiration at its perceived fairness and respect for the rule of law, and at the complexity of Old Babylonian society. There was also much discussion of its influence on the Mosaic Law. Scholars quickly identified lex talionis—the "eye for an eye" principle—underlying the two collections. Debate among Assyriologists has since centred around several aspects of the Code: its purpose, its underlying principles, its language, and its relation to earlier and later law collections.
Despite the uncertainty surrounding these issues, Hammurabi is regarded outside Assyriology as an important figure in the history of law and the document as a true legal code. The U.S. Capitol has a relief portrait of Hammurabi alongside those of other historic lawgivers.