In December 1901, a French archaeological team digging at Susa, in what is now western Iran, hauled out of the ground a pillar of black basalt taller than a man. It was carved top to bottom in tight columns of cuneiform, and at the top, a king stood before a seated god. The odd thing was that Susa was the wrong place for it. This was a Babylonian monument, and it had been hauled to Susa centuries after it was made, as war loot, by raiders who'd sacked a Mesopotamian city. The stone they'd carried off as a trophy is now one of the most famous objects in the Louvre. We call it the Code of Hammurabi.

It's routinely described as the world's first written laws, the foundation of justice, the origin of "an eye for an eye." Some of that is true. A surprising amount of it isn't. And the gap between the legend and the actual stone is where the interesting history lives.

The king behind the name

Hammurabi ruled Babylon from roughly 1792 to 1750 BCE. When he came to the throne, Babylon was a fairly minor kingdom in a crowded neighbourhood of rival city-states (Larsa, Mari, Eshnunna, Assyria), all jostling for land and water along the Tigris and Euphrates. Hammurabi spent the first couple of decades of his reign mostly keeping his head down and building up his city.

Then, in the second half of his reign, he moved. Through a series of shrewd campaigns and shifting alliances, he conquered or subdued his rivals one by one until he'd built the first true Babylonian Empire, dominating most of Mesopotamia. He was, by the standards of the age, an unusually capable administrator as well as a soldier. We have his letters, and they show a king closely involved in the practical business of canals, harvests, and disputes among his subjects.

The law stele belongs to the end of all this. It was carved late in his reign, a monument by a powerful king looking back on a long career and presenting himself, above all, as a bringer of justice.

Ancient cuneiform writing
Cuneiform - the wedge-shaped script in which Hammurabi's laws were carved.

What is carved on it

The monument is built like a sandwich. At the top is that famous carved scene: Hammurabi standing in respect before Shamash, the sun god and the Mesopotamian god of justice, who hands him the symbols of authority. Then comes a long prologue in grand poetic language, where Hammurabi lists his pious works and his divine mandate to make justice shine in the land. Then the laws themselves: somewhere around 282 individual provisions, though some are damaged. Then an epilogue full of blessings on anyone who respects the laws and spectacular curses on anyone who defaces them.

The laws are written as a long series of "if... then" cases. If a man does this, his penalty is that. They cover an enormous range of ordinary life: theft, false accusation, the duties of judges, marriage and divorce, inheritance, adoption, the wages of laborers, the rates of hire for an ox or a boat, the responsibilities of builders and surgeons, debt, slavery, and assault.

What you don't find is anything resembling a modern legal philosophy or a constitution. It's casuistic, built from specific cases, and it almost certainly didn't function the way a modern law code does, as the single binding statute a judge looks things up in. We'll come back to that, because it matters.

Different penalties by rank

Hammurabi's laws are openly unequal by design. The same crime carried different penalties depending on the social rank of the people involved. A free man, a commoner, and a slave were not treated alike. Injuring a slave meant paying compensation to the owner, while injuring a social equal could bring matching physical retaliation. The "eye for an eye" principle, in other words, applied mainly between people of the same class.

The big myth: not the first laws

Here's the claim you'll see everywhere, and it's the one I most want to correct: that the Code of Hammurabi is the world's first written law code. It isn't, and it wasn't even close.

At least two earlier Mesopotamian law collections predate it by centuries. The oldest we currently have is the Code of Ur-Nammu, from the city of Ur, dating to roughly 2100 BCE, around three and a half centuries before Hammurabi. There's also the Code of Lipit-Ishtar of Isin and the Laws of Eshnunna, both also earlier than Babylon's famous stele. Hammurabi was working in a long-established tradition of royal law-giving, not inventing one.

And there's a striking detail buried in those older codes. Ur-Nammu's laws, the earliest we have, often prescribe fines and monetary compensation for bodily injury rather than physical retaliation. So in one sense the older law was actually less brutal than Hammurabi's famous "eye for an eye." The history of early law is not a tidy climb from savagery to civilisation; it zigzags.

The first laws ever written

"The Code of Hammurabi is the world's first written law code."

Ur-Nammu got there first

It's the most complete and famous early code, not the first. The Code of Ur-Nammu predates it by roughly 300 years, and the Laws of Lipit-Ishtar and of Eshnunna also come earlier. Hammurabi inherited a centuries-old Mesopotamian tradition of royal law-giving; his monument simply survived in spectacular, near-complete form.

"An eye for an eye"

This is the phrase everyone knows, and it really does come from here: the principle scholars call lex talionis, the law of retaliation. If a man destroys the eye of another man, his eye shall be destroyed. If he breaks a man's bone, his bone shall be broken. Centuries later the same principle would appear in the Hebrew Bible, in language so close that scholars have long debated the connection.

To modern ears it sounds purely savage. But it's worth understanding what it was probably for. In a world without police forces or appeal courts, blood feuds could spiral: a minor injury answered with a killing, answered with a massacre. A strict rule of exact, proportional retaliation actually puts a ceiling on revenge. An eye for an eye also means only an eye for an eye, no more. Read that way, talionis is less an incitement to cruelty than an attempt to cap it.

And notice again the class catch: it applied between social equals. If a man of higher rank blinded a commoner or a slave, he typically paid silver rather than losing his own eye. The principle of exact retaliation was bound up with a rigidly hierarchical society, and it can't be lifted out of that context honestly.

The eye-for-an-eye clauses
"If a man has destroyed the eye of a member of the aristocracy, they shall destroy his eye. If he has broken another man's bone, they shall break his bone... If he has destroyed the eye of a commoner, he shall pay one mina of silver."
— Laws of Hammurabi, provisions 196-198, as translated in standard editions of the code

The strange question of whether it was even used

This is where the scholarship gets interesting, and where the popular image falls apart most completely. We tend to assume the stele was a working rulebook, and that Babylonian judges consulted it the way a modern court consults a statute. But the evidence for that is surprisingly thin.

We have thousands of records of actual legal cases and contracts from Hammurabi's Babylon and the periods around it. And here's the puzzle: those real court records almost never cite the code. They don't quote its provisions; the outcomes don't consistently match its penalties. If this was the binding law of the land, the people actually deciding cases seem to have ignored it.

Monument or working law?

What was the stele actually for? Many Assyriologists now argue it functioned less as enforced legislation and more as a royal monument: a king advertising himself to the gods and to posterity as the ideal just ruler, in the form of an idealised "treatise" on justice rather than a working statute book. Others maintain it reflected real legal norms judges drew on, even if they didn't cite it line by line. The truth is probably somewhere in between, but "law code" in the modern sense overstates what we can prove.

If the skeptics are right, the monument is something subtler and arguably more fascinating than a rulebook. It's a piece of royal self-presentation, Hammurabi telling the gods, his subjects, and the future that under his rule the strong did not oppress the weak and justice was done. That was the message he wanted carved in stone and left standing forever. The specific penalties may be illustrations of an ideal rather than statutes to be looked up.

A window into a vanished daily life

Whatever its legal force, the code is an absolute treasure for anyone curious about how ordinary people in Babylon actually lived, because it touches so many corners of normal existence.

It tells us a tavern-keeper, often a woman, could be in serious trouble for watering down beer or overcharging. It sets out what happened to a builder whose shoddy house collapsed and killed the owner (he could be put to death: early, brutal building-safety law). It regulates the fees a surgeon could charge and the penalties if an operation went wrong, with the penalty again scaled to the patient's rank. It deals with a wife's property if her husband was taken prisoner in war, with adoption, with the inheritance rights of children, with the wages of a hired ox-driver.

Read it slowly and a whole society swims into view: a place of farmers and merchants and soldiers and slaves, of canals and contracts and lawsuits, where women could own property and run businesses but lived inside firm legal limits, where rank shaped everything. It's one of the richest snapshots of daily life anywhere in the ancient world, far older than Greece or Rome.

The curses, and the long afterlife

The epilogue is worth lingering on, because it shows what Hammurabi thought he was doing. He doesn't just bless those who keep his laws; he calls down extraordinary curses on any future ruler who would erase his name or alter his words. May his land fall into chaos, his people scatter, his reign be filled with weeping. He was trying to make the monument, and his reputation as the just king, permanent.

In a strange, accidental way it worked. The stele was hauled off to Susa as plunder, buried for three thousand years, and then dug up and placed in the Louvre, where millions of people now read his name. The empire he built fell apart within a generation or two of his death. But the man who wanted to be remembered as the great lawgiver got exactly that, arguably more than any king in history. We still teach schoolchildren "an eye for an eye" and put his profile in textbooks of the history of law.

The irony is that we remember him for being first when he wasn't, and for a working law code that may never have worked the way we think. But strip away the myths and what's left is still remarkable: a powerful king, nearly four thousand years ago, who chose to define himself not by conquest but by justice, and who carved that claim in stone so confidently that it outlasted his empire by millennia. Few kings got so much. That might even be the point.

Image: the upper portion of the Code of Hammurabi stele, showing the king before the sun god Shamash, Louvre Museum (public domain, via Wikimedia Commons).

Read next: The Sun Gate of Nineveh: A King's Stele Buried Between Two Destructions and Cyrus Cylinder: The Clay Barrel Sold as the First Bill of Rights.

Sources & further reading

  • Martha T. Roth, Law Collections from Mesopotamia and Asia Minor (Society of Biblical Literature, 2nd ed., 1997) — the standard scholarly translation of Hammurabi's laws alongside the earlier codes of Ur-Nammu, Lipit-Ishtar and Eshnunna.
  • Marc Van De Mieroop, King Hammurabi of Babylon: A Biography (Blackwell, 2005).
  • Dominique Charpin, Writing, Law, and Kingship in Old Babylonian Mesopotamia (University of Chicago Press, 2010).
  • The Louvre Museum, object record for the Code of Hammurabi stele.
  • Encyclopaedia Britannica, "Code of Hammurabi" and "Hammurabi."