Deep Dive · Ancient Mesopotamia

The Code of Hammurabi: The World’s First Great Law Code

The Code of Hammurabi is the most famous legal text of the ancient world. Issued by the Babylonian king Hammurabi around 1754 BCE, it is a collection of 282 laws inscribed on a basalt stele about 2.25 meters (7 feet 4 inches) tall, now in the Louvre in Paris. The Code is one of the oldest deciphered legal texts in the world, and it gives an extraordinarily vivid picture of the social, economic, and family life of ancient Babylonia. It is also the model for almost every subsequent law code in the Western tradition. The Roman Twelve Tables (c. 450 BCE) are now generally thought to have been modeled on the Greek law codes — particularly the Athenian code of Solon — rather than directly on Hammurabi, despite the older 19th-century tradition (sometimes called the Biblia thesis) that linked the two; the connection is suggestive but not direct.

A black basalt stele, almost eight feet tall and 3,600 lines long, is sitting in the Louvre. It was dug up in 1901 from a Persian ruin at Susa, carried off as war booty by the Elamites around 1158 BCE, and it contains the most famous law code of the ancient world. This page walks through the stele, the prologue, the 282 laws, and the people they were written for, with links to Babylon, the Sumerians, the Ziggurat of Ur, and the Ancient Mesopotamia pillar.

The Stele

The Code of Hammurabi is inscribed on a single stele of black basalt, originally erected in the temple of Marduk in Babylon. At the top of the stele is a relief sculpture showing Hammurabi standing before the seated sun god Shamash, the god of justice, who is giving Hammurabi the symbols of royal authority. Below the relief, the laws are inscribed in cuneiform script, in 3,600 lines of text. The stele was discovered in 1901 by the French archaeologist Jacques de Morgan at the site of Susa in Persia, where it had been carried as a trophy by the Elamites around 1158 BCE.

The Prologue

The Code begins with a long prologue in which Hammurabi describes himself as the king “who causes justice to prevail in the land, who destroys the wicked and the evil, who prevents the strong from oppressing the weak.” The prologue lists Hammurabi’s titles and his major achievements, particularly his work of consolidating the Babylonian state and his major building projects in the cities of his empire. The prologue frames the laws as the work of a king who is acting on behalf of the gods, in particular Marduk, the patron god of Babylon.

The Laws

The 282 laws are arranged in a rough order, from the most general to the most specific. The first laws concern false accusations, bribery, and the conduct of judges. Then come laws on property, trade, and labor. Then come laws on family and marriage. Then come laws on bodily injury, medical malpractice, and the work of builders. Then come laws on the ownership and treatment of slaves. The final laws deal with miscellaneous matters such as the rental of boats, the wages of oxen, and the penalties for cattle that damage a neighbor’s field.

The Code is famous for its principle of lex talionis — the law of retaliation — captured in the phrase “an eye for an eye, a tooth for a tooth” (Laws 196, 200, and 201). The principle is not applied uniformly, however; the punishments varied according to the social class of the victim and the offender. Law 196, for instance, requires the eye of the offender if he puts out the eye of an awelum (a free man); Law 198 requires the same penalty if the eye of an awelum is put out in a fight, but the penalty for putting out the eye of a muškenum (a commoner) is only a fine (Law 199); and the penalty for putting out the eye or breaking the bone of a slave is that the owner be paid the slave’s market value (Law 199). The Code also distinguishes the status of slave from that of free man in the labor code, in family law, and in the rules of evidence.

The Prescripts

Each law is preceded by a short “prescript” that sets up the situation. For example:

If a man accuses another man of laying a spell on him, but cannot prove it, the accused shall go to the river and leap into the river. If the river drowns him, the accuser shall take over his house. If the river shows the man to be innocent, and he comes out unharmed, the man who laid the spell shall be put to death, and the accuser shall take over his house. (Law 2)

The prescripts make the Code unusually vivid and readable. The law of the injured builder, for example, reads:

If a builder builds a house for a man and does not make its construction sound, and the house he has built collapses and causes the death of the owner of the house, that builder shall be put to death. (Law 229)

The Classes of Babylonian Society

The Code recognizes three main classes of Babylonian society: the awelum (the free man, the patrician), the muškenum (the commoner, perhaps a dependent of the palace or the temple), and the wardum (the slave). The punishments for the same crime varied by the class of the victim and the offender. Hitting an awelum cost more than hitting a muškenum; the property of an awelum was protected more carefully than the property of a muškenum.

The Code and Women

The Code includes a great deal of material on women’s rights and obligations. Women could own property, initiate divorce, and operate businesses. They were protected against false accusations of adultery. They were entitled to a share of the inheritance of their father’s estate. They were required to be faithful to their husbands and to observe strict rules about their appearance and behavior in public. Prostitution was legal and regulated. Adultery was punished by drowning (for the wife) or by exile (for the husband who tolerated it).

The Code and Slavery

Slaves in Babylonian society were, as in most ancient societies, a form of property. They could be bought, sold, rented, pledged, and bequeathed. The Code, however, gave them certain protections: an owner who killed his slave lost the slave’s value to the palace; a slave who was injured by a third party had a right of action against the offender; a slave who could prove that he had been ill-treated by his master could be sold to a new master.

The Legacy of the Code

The Code of Hammurabi was the first comprehensive law code in the world to be preserved in written form, and it is one of the foundational documents of the Western legal tradition. The Roman Twelve Tables (c. 450 BCE) are now generally thought to have been modeled on Greek law codes, particularly the Athenian code of Solon — not directly on Hammurabi — but the older 19th-century Biblia tradition argued for a Babylonian connection, and the question is still debated. The Code’s principle of proportional punishment, its protection of the weak against the strong, its recognition of the rights of women and slaves, and its commitment to a written and published legal code are all features that we now consider basic to any decent legal system.

The Code has also been the subject of intense modern scholarly debate. Some scholars have read it as a “primitive” system of brutal retaliation; others have read it as a sophisticated and humane system of social justice. The truth, as so often, lies in the middle: the Code is both more humane and more brutal than the modern reader expects. It is the product of an ancient, sophisticated, and not yet fully developed civilization.