Rabbit Hole MapsAbout

History › First civilizations › Sumer and Mesopotamia: the first cities

Code of Hammurabi

c. 1754 BC, Babylon· Book, artwork, monument or document· Middle East & Africa

Well documentedSolid records, physical evidence or scientific consensus.

A collection of about 282 laws issued by King Hammurabi of Babylon and carved on a black stone pillar.

See it on the History map →

What happened

Hammurabi united much of Mesopotamia from Babylon and, late in his reign (about 1754 BC), published laws on trade, loans, wages, land leases, property, marriage, theft and injury. Each follows an 'if someone does X, then Y' format. Punishments depended on social class: 'an eye for an eye' applied between equals, while injuring a commoner or slave usually meant a fine. A prologue presents the king as appointed by the gods to protect the weak.

Why it matters

It is the best-known early example of a ruler publishing written laws, so that rules and penalties were public and fixed rather than at a judge's whim.

Think of it like

Part building code with liability: if a builder's house collapsed and killed the owner, the builder could be put to death (Law 229).

How we know

The 2.25 m (7.4 ft) stone stele, found at Susa, Iran, in 1901 and now in the Louvre; many clay-tablet copies made in scribal schools for centuries.

Still debated

Whether judges actually applied these laws, or the code was mainly royal propaganda and a model of justice, is debated.

Connections (2)

▸Sumer and Mesopotamia: the first cities laid the legal groundwork for Code of HammurabiMostly agreed

The connection

Hammurabi did not invent written law. Sumerian kings had already issued law collections: Ur-Nammu of Ur about 2100 BC and Lipit-Ishtar of Isin about 1930 BC. They used the same 'if someone does this, then that' format and many similar rules on property, marriage, slaves and fines. Hammurabi's scribes built on this tradition, writing in Akkadian.

When and how

Southern Mesopotamia, from Ur-Nammu's laws about 2100 BC to Hammurabi's Babylon about 1754 BC.

How sure are we?

Clay tablets of the Ur-Nammu and Lipit-Ishtar laws, and the Laws of Eshnunna, show the same format and many overlapping rules.

Debates and open questions

How much Hammurabi copied directly versus drew on shared legal custom is unclear; the earlier law collections survive only in fragments.

▸Code of Hammurabi has laws paralleled in Hebrew prophets and the Hebrew BibleMostly agreed

The connection

Several laws in the Torah (Exodus, Leviticus and Deuteronomy, in the Hebrew Bible) closely resemble Hammurabi's: 'an eye for an eye', and rules for an ox that gores a person. Both use the same 'if a man does X' format. The biblical laws differ by framing law as God's covenant and often applying penalties more equally across classes.

When and how

Babylon about 1754 BC; the biblical law collections were written down roughly 900–500 BC in Israel and Judah (dates debated).

How sure are we?

Side-by-side comparison: the goring-ox laws (Hammurabi 250–252; Exodus 21:28–32) are nearly identical in structure; scribes copied Hammurabi's code for over a thousand years.

Debates and open questions

Whether biblical writers knew Hammurabi's text directly, through later copies, or simply shared a common regional legal custom is debated.