The History Trail Everything Has a History Search

Things

Code of Hammurabi

The Code of Hammurabi is the most complete surviving collection of ancient Babylonian law: 282 case laws issued by Hammurabi, king of Babylon (reigned c. 1792-1750 BCE), collected late in his reign and carved in Akkadian cuneiform on a black basalt stele, between a prologue and an epilogue that present the king as the gods' guardian of justice. It covers trade, property, family, injury and slavery, and it is famous for the lex talionis - 'an eye for an eye'. Looted to Susa in the 12th century BCE, it was rediscovered there in 1901-02 and is now in the Louvre.

The tall black basalt stele of the Code of Hammurabi in the Louvre, topped by a relief of Hammurabi before the seated sun god Shamash and covered in cuneiform text
The black basalt stele bearing the Code of Hammurabi, now in the Louvre (Sb 8): at the top Hammurabi stands before Shamash, god of justice; below are about 4,130 lines of cuneiform text. Photograph by Rama. Photo: Rama, CC BY-SA 3.0 fr, via Wikimedia Commons.

At a Glance

The king
Hammurabi, sixth king of Babylon's First (Amorite) Dynasty, reigned c. 1792-1750 BCE
The text
282 case laws in Akkadian cuneiform, between a prologue and an epilogue, on a black basalt stele 2.25 m tall
His name for it
Dinat misharim - 'verdicts of the just order'; Hammurabi said it was legal aid for anyone seeking advice
Contents
Prices, tariffs, trade and loans; marriage, divorce and inheritance; theft and assault; medical and building liability; slavery and debt
The famous rule
Law 196: 'If a man has destroyed the eye of another man, his eye shall be destroyed' - but retaliation applied between equals; injury to a commoner or a slave was paid for in silver
Not the first
Older law collections survive, including Ur-Nammu (c. 2100 BCE), Lipit-Ishtar and Eshnunna; Hammurabi's is the most complete
The stele today
Louvre Museum, Paris (Sb 8); carried off to Susa by Elamite raiders in the 12th century BCE and found there in 1901-02

Introduction

The Code of Hammurabi is a collection of legal decisions issued in the name of Hammurabi, sixth king of the First Dynasty of Babylon, who reigned from about 1792 to 1750 BCE. Collected toward the end of his reign, the decisions were carved in Akkadian cuneiform on a stele of black basalt 2.25 metres tall, between a prologue presenting the king as the gods' guardian of justice and an epilogue blessing kings who honour the text and cursing any who deface it. Britannica calls it the most complete extant collection of Babylonian laws: 282 case laws covering prices and trade, marriage and divorce, assault and theft, slavery and debt.

The stele's journey is as remarkable as its text: carried off as war booty to Susa, in modern Iran, in the 12th century BCE, it lay there three thousand years until a French expedition found it, in three pieces, in the winter of 1901-02. It now stands in the Louvre. Mesopotamian scribes had already copied and studied the text for over a thousand years.

Hammurabi and the Making of Babylon

Hammurabi inherited a kingdom that was one power among several in a divided Mesopotamia. Britannica's account, reconstructed from his year-names and correspondence, shows two decades of shifting coalitions - temples, canals, fortified borders - before he struck in the last fourteen years of his reign. In 1764 BCE he defeated a coalition of Ashur, Eshnunna and Elam east of the Tigris. In 1763 he moved against his great southern rival, Rim-Sin of Larsa; after a siege of several months Larsa fell, and southern Babylonia was his. In 1761 he destroyed Mari, his former ally. By his death about 1750 BCE he had transformed a small city-state into a large territorial state and shifted Mesopotamia's centre of power from the south to Babylon in the north, where it stayed for over a thousand years.

The laws belong to that state-building. Hammurabi called his work dinat misharim, 'verdicts of the just order', and the epilogue states its purpose: legal aid for persons in search of advice - a wronged man could come to the stele, have its words read to him, and learn his case. His laws - not a code in the modern sense, as Britannica notes - were also an expression of his concern to be seen as a just ruler.

The Stele and Its Laws

At the top of the stele a relief shows Hammurabi standing before the seated Shamash, sun god and god of justice, who holds out the rod and ring of authority toward the king. Below the relief run about 4,130 lines of cuneiform. The laws themselves are casuistic - stated as cases: if a man does this, then that follows. Their order is deliberate, grouped by subject: courts and false witness first, then theft, land, trade and loans, family and inheritance, bodily injury, professional liability, wages, and finally slaves.

The content is a cross-section of a whole society, priced and regulated: interest on loans, rents, bride price and dowry, even the felling of a neighbour's palm tree. Its penalties are famously severe, and its most famous principle is the lex talionis, retaliation in kind. Law 196 reads, in the standard translation: 'If a man has destroyed the eye of another man, his eye shall be destroyed.' If a builder's house collapsed and killed the owner, the builder was to be put to death; if it killed the owner's son, the builder's son was to die. Yet the same text fixes careful money compensation for many injuries; its severity, Britannica suggests, may reflect the Amorite tradition of Hammurabi's dynasty rather than older Sumerian practice.

Timeline

  1. c. 2100 BCE

    The laws of Ur-Nammu of Ur, the oldest surviving law collection - Hammurabi's is not the first, only the most complete.

  2. c. 1792 BCE

    Hammurabi succeeds his father Sin-muballit as king of Babylon, still a young man.

  3. 1764 BCE

    Hammurabi defeats a coalition of Ashur, Eshnunna and Elam east of the Tigris.

  4. 1763 BCE

    He conquers Larsa after a siege of several months, taking southern Babylonia from Rim-Sin.

  5. 1761 BCE

    He destroys Mari, his former ally, extending Babylon's power up the Euphrates.

  6. Toward 1750 BCE

    Hammurabi's legal decisions, collected late in his reign, are carved on the basalt stele; he dies about 1750 BCE.

  7. 12th century BCE

    The Elamite king Shutruk-Nahhunte carries the stele off to Susa as plunder from Babylonia.

  8. 7th century BCE

    Copies are still being made, including in Ashurbanipal's library at Nineveh; scribes study the text for over a millennium.

  9. December 1901 - January 1902

    A French expedition under Jacques de Morgan finds the stele, in three fragments, at Susa.

  10. 1902

    Jean-Vincent Scheil publishes the text and translation; modern numbering of the laws follows his.

Significance

The Code's significance begins with survival. It is the longest, best-organised and best-preserved legal text from the ancient Near East, and it shows an entire legal culture at work - courts, prices, family arrangements, class structure - as fragments of earlier codes cannot. Its publication in 1902 created, Britannica records, a whole branch of comparative jurisprudence, the study of cuneiform law, and it remains the most frequently cited cuneiform document in the specialist literature.

It is also evidence, not just monument. Because the laws price everything from a surgeon's fee to a boat's hire, and grade penalties by the rank of the person harmed, historians read them as a map of Babylonian society: who counted, and what things cost. The resemblance of many rulings to the laws of the Hebrew Bible, above all the Book of the Covenant in Exodus, is now explained by common heritage rather than direct borrowing: two peoples drawing on one Near Eastern legal tradition.

Myths and disputes

Was it the first law code? No. Hammurabi's Code was once considered the oldest promulgation of laws in human history, but older, shorter collections have since been found: the laws of Ur-Nammu are some three centuries earlier, and the collections of Lipit-Ishtar and of Eshnunna also predate it. Hammurabi's is the most complete, not the first.

Did 'an eye for an eye' apply to everyone? No - and this is the point most summaries miss. Retaliation in kind applied between social equals of the highest class, the awilum. Destroy a mushkenum's eye - a palace-dependent commoner's - and the penalty was a fine of one mina of silver; a slave's eye cost half the slave's value. The Code divided the population into awilum, mushkenum and wardum (slave), and the same injury carried three different consequences depending on who was hurt - though the boundary between the first two classes was not sharp in practice.

Was it a working statute book? Genuinely disputed: Britannica calls whether the judgments were meant to have binding force, in the modern statutory sense, 'a matter of controversy', contrasting the codes, 'about whose binding force there is much doubt', with royal edicts, which contemporary legal documents do cite. The collection is also incomplete as a system: it jumps between topics and, as Britannica notes, its compiler had no intention of covering all possible contingencies. Even the famous number needs a footnote: the Elamites polished away several columns of the text in antiquity, apparently for an inscription never added, so counts differ - Britannica's Mesopotamia survey gives 280 judgments on Scheil's division, while the conventional numbering runs to 282.

Legacy

In its own world, copied for over a thousand years, it became a scribal classic - a model of royal justice long after Babylon's empire had shrunk. In the modern world its legacy is the idea it embodies: law as something written, public and fixed, set up in stone where the wronged man may come and read it. Every later code, from the Roman compilations to modern civil codes, shares that founding gesture - the ruler's justice made legible to the ruled.

Sources

  1. Encyclopaedia Britannica - Hammurabi
  2. Encyclopaedia Britannica - History of Mesopotamia: Babylonian law
  3. BiblicalTraining Library - Code of Hammurabi
  4. Louvre Museum guide - Mesopotamia and the Ancient Near East

The facts on this page were checked against these sources on 19 November 2026. The History Trail's permanent pages are researched and written for this site; the live profiles elsewhere on The History Trail are assembled automatically from Wikipedia and Wikidata.

About the Author

Researched and written by the The History Trail Editorial Team — the accountable editorial function behind this site's permanent story pages. The team works from the published sources cited on each page; it does not invent historians, reviewers or credentials, and it corrects errors openly.

Fact Check

Every load-bearing fact on this page traces to one of the sources listed above, and significant claims link to their source in the text. Our checking method is described on the methodology page; errors can be reported via the corrections page.

Sources & Citations

Cite this page as: The History Trail Editorial Team, The History Trail — this article's title, publication and update dates are shown beneath its headline. The full source list appears under Sources above; the site's source standards are on the sources page.

Search any name, invention or event

Every subject in the archive — researched story pages and live profiles alike.