Kingship and Law

Medieval Law: The Code of Hammurabi

The Code of Hammurabi is an ancient Babylonian law collection, not a medieval one. Learn its real date, what it said, and how it compares with medieval law.

On this page
  1. The title needs a correction
  2. What the code was
  3. What the laws covered
  4. Retaliation and social rank
  5. Why people compare it with medieval law
  6. A note on later reputation
  7. Quick facts

The title needs a correction

The Code of Hammurabi is not medieval. It comes from ancient Mesopotamia and is about 3,700 years old, more than two thousand years before the Middle Ages began. Hammurabi was a king of Babylon who is usually placed in the eighteenth century BCE, with a reign often dated to roughly 1792 to 1750 BCE, though scholars use different chronologies and the dates are approximate. The text sits in the same long history of written law as later codes, which is why it is sometimes mentioned alongside medieval law, but it has no direct place in medieval European legal practice.

What the code was

The best-known copy is carved on a tall, black stone pillar, called a stele, which was discovered at Susa in modern Iran in 1901 and 1902 by a French expedition. It had been carried there from Babylonia centuries after Hammurabi’s time, probably as war booty. It is now in the Louvre in Paris. Other copies of the text on clay tablets show that it was copied and studied by scribes for a long time.

The inscription has three parts: a prologue, a long series of provisions, and an epilogue. The prologue praises Hammurabi as a ruler chosen by the gods to bring justice and to protect the weak. The epilogue repeats that theme and calls down curses on anyone who changes or ignores the text. In between come roughly 280 provisions, usually numbered by modern scholars, which are written as conditional statements: “If a man does X, then Y.”

What the laws covered

The subjects reveal a society of farmers, merchants, craftsmen and temple and palace officials.

  • Property and trade. Contracts, loans, debts, storage of goods and the duties of agents who carried merchants’ goods.
  • Family law. Marriage arrangements, dowries, adoption, inheritance and divorce.
  • Agriculture. Responsibility for damage to fields, irrigation canals and hired animals.
  • Professions. Fees and penalties for builders, doctors, boat-builders and others, some of which set liability if their work failed.
  • Crimes against persons. Theft, assault, false accusation and killing.
  • Slavery. Rules about slaves, their ownership and runaways.

Retaliation and social rank

The code is famous for its “eye for an eye” principle, the idea of retaliation in kind. Some provisions do say that if a man blinds the eye of another man of the same rank, his own eye shall be blinded. But the code applies this strictly only between equals. If the victim was of lower status, the penalty was often a fine, and the status of both parties affected the punishment. In other words, it did not treat everyone alike.

Many provisions also set penalties that look harsh, including death for various offenses. Historians debate how often such sentences were really carried out, and how far the text describes actual court practice rather than an ideal of royal justice. Surviving letters and legal records from Babylonia show judges deciding cases in ways that do not always match the stele, so scholars are cautious about calling it a statute book that courts simply applied.

Procedure appears too. A person accused of certain serious offenses, such as sorcery, might be sent to a river ordeal, being thrown into the river to see whether the god would save the innocent. It is one reason people point to parallels with the ordeals used much later in medieval Europe, though the two practices are separated by a huge span of time and no continuous tradition links them.

Why people compare it with medieval law

Comparisons have some basis, as long as they are understood as parallels and not as influence.

  1. Law presented as a gift of a just king. Both Hammurabi and many medieval rulers claimed to protect the weak and were praised for giving justice. Medieval kings swore to do justice at their coronations.
  2. Penalties tied to status. Medieval European compensation systems also set different amounts depending on the rank of the injured person. Under much early customary law, killing a lord cost more than killing a peasant.
  3. Compensation and retaliation. Early medieval codes were full of lists of payments for particular injuries, a pattern that looks similar on the surface.
  4. Use of divine judgment. Both worlds used ordeals when evidence was lacking.

There are differences as well. Hammurabi’s code is a royal inscription from a state with scribes, temples and palaces. Medieval legal sources are spread across many kingdoms, languages and legal traditions, and they include church law, royal decrees and local custom. The social and religious world is also different: medieval Christian law was shaped by church doctrine and by the heritage of Roman law, which the Justinian code preserved. It had no knowledge of Babylonian law.

A note on later reputation

Hammurabi’s code is often described as the “first” law code. That claim needs caution. Older Mesopotamian law collections are known, such as the laws associated with the rulers of Ur and Eshnunna, which scholars date earlier. Hammurabi’s is simply the most complete and best known. The stele’s modern fame comes partly from its dramatic discovery and from the popular appeal of the retaliation principle.

If you are looking for the legal systems that actually shaped the Middle Ages, a better starting point is early medieval customary law, Roman law as preserved in the Byzantine world, church canon law and the royal courts that grew in the twelfth and thirteenth centuries. Hammurabi’s stele remains a valuable window into ancient ideas about kingship, justice and punishment, and it provides a useful contrast to what later societies did.

Quick facts

  • Ruler: Hammurabi of Babylon, eighteenth century BCE.
  • Text: roughly 280 provisions with a prologue and epilogue.
  • Famous copy: the stele found at Susa, now in the Louvre.
  • Relationship to the Middle Ages: no direct link, only parallels in ideas such as royal justice and status-based penalties.

The complete guide to kingship and law

Medieval Kingship: Power, Authority, and Legitimacy
Read the guide

Keep exploring

Guides from other topics

All topics →