Great work · Ancient Near East

Code of Hammurabi

Periodc. 1753 BCE – present
Made byHammurabi, sixth king of the Amorite First Dynasty of Babylon, in whose name the text was purportedly written near the end of his reign; the scribes and the draughtsman of the relief, working in a tradition of earlier Sumerian and Akkadian law collections issued by rulers.
FormAbout 4,130 lines of cuneiform in the Old Babylonian dialect of Akkadian: a 300-line prologue and a 500-line epilogue in poetic style around casuistic “if ... then” laws; the primary copy is a basalt stele 2.25 m tall, topped by a relief of Hammurabi with the god Shamash.
Where it is nowThe stele is on the second floor of the Louvre, in Room 227 of the Richelieu wing; over 50 manuscripts of the laws come from Susa, Babylon, Nineveh, Assur, Borsippa, Nippur, Sippar, Ur, Larsa and other sites; replicas stand at the United Nations in New York, the Peace Palace in The Hague and the Pergamon Museum in Berlin.
Known forlex talionis, “an eye for an eye”; Hammurabi's aim “to prevent the strong from oppressing the weak”; penalties that differ by class and gender; laws on physicians, builders and prices; the curses of the epilogue; the debate over whether it is a true code; comparison with the Covenant Code of Exodus

6 min read · Last reviewed October 2026

At a glance

  • Composed near the end of Hammurabi's reign, the text sets about 4,130 lines of cuneiform on a basalt stele: a poetic prologue and epilogue around laws phrased as “if ... then” cases on criminal, family, property and commercial matters.
  • Its laws rest on principles such as lex talionis, “an eye for an eye”, and treat people unequally by class and gender, distinguishing the awīlum, the muškēnum and the slave.
  • Taken as plunder to Susa and found there in 1901, the stele is in the Louvre; scholars still debate whether the text was enforced legislation, a record of past cases or a work of scholarship.

Timeline

  1. c. 1792 BCEHammurabi inherits the throne of Babylon from his father Sin-Muballit, beginning a reign that lasts until around 1750 BCE
  2. c. 1753 BCEThe Code is composed near the end of Hammurabi's reign, as the list of his achievements in its prologue shows
  3. 7th–6th century BCEThe Code appears in a late Babylonian list of literary and scholarly texts, long a part of the scribal curriculum
  4. 1901–1902The French Archaeological Mission under Jacques de Morgan finds the stele in three large fragments on the acropolis of Susa
  5. 1902Jean-Vincent Scheil publishes the editio princeps, with a transliteration and a free translation into French
  6. 1947–1952The codes of Lipit-Ishtar and Ur-Nammu and the Laws of Eshnunna are rediscovered, showing that older law collections existed
  7. 1950Benno Landsberger begins the line of criticism that most judges paid the Code no attention, against the view that it was enforced law

Origins

Lipit-Ishtar
Lipit-IshtarCC0

Hammurabi, sixth king of the Amorite First Dynasty of Babylon, ruled from around 1792 to around 1750 BCE (middle chronology). When he inherited the throne of his father Sin-Muballit, Babylon held little local sway and the local hegemon was Rim-Sin of Larsa. Hammurabi waited until Rim-Sin grew old, conquered his territory in one swift campaign, and later betrayed allies in Eshnunna, Elam and Mari to gain their territories, securing Babylonian dominance over the Mesopotamian plain through military prowess, diplomacy and treachery. His letters nonetheless suggest concern for the welfare of his subjects and an interest in law and justice, and in them he often presents himself as his people's shepherd.

The Code stands in an older tradition. Earlier law collections in Sumerian and Akkadian survive, among them the Code of Ur-Nammu of Ur, the Code of Lipit-Ishtar of Isin and the Laws of Eshnunna, and like Hammurabi's they purport to have been written by rulers; statements of other rulers suggest the custom was widespread. Thousands of legal documents also survive from before and during the Old Babylonian period, among them contracts, judicial rulings and reform documents such as that of Urukagina, king of Lagash. Scribes were still copying the Code of Ur-Nammu when Hammurabi produced his own, which suggests the earlier collections not only resembled the Code but influenced it.

What It Is

Hammurabi
HammurabiMbzt, CC BY 3.0

The primary copy is a basalt stele 2.25 m tall. At its top a relief appears to show Hammurabi standing before the seated Shamash, the Babylonian sun god and god of justice, who wears the horned crown of divinity with flames spouting from his shoulders. Below are about 4,130 lines of cuneiform. The 300-line prologue tells how the gods Anum and Enlil chose Hammurabi to rule “to prevent the strong from oppressing the weak”, and lists his achievements and virtues. The 500-line epilogue exalts the laws, hopes that a wronged man may have the stele read aloud to him and know his rights, and invokes the wrath of the gods on anyone who disobeys or erases its pronouncements.

Between them stand what are generally called the laws: casuistic “if ... then” sentences covering criminal, family, property and commercial law, among them physicians' fees, builders' liability, commodity prices and a maximum interest rate of 20%. Lex talionis underlies many penalties: laws 196 and 200 prescribe an eye for an eye and a tooth for a tooth. Persons were not equal before the law; the Code distinguishes the awīlum, probably a man of a higher social class, the muškēnum, probably a commoner, and the male and female slave (wardum and amtum). Yet it also punishes unsubstantiated accusations, values written evidence and recognises a defendant's intentions.

How It Was Made

The text is written in the Old Babylonian dialect of Akkadian, in a regular and repetitive style. Its cuneiform signs are arranged vertically within boxes placed in bands side by side from right to left, an arrangement already antiquated by Hammurabi's time. The list of the king's achievements in the prologue has helped establish that the text was compiled late in his reign. Prologue and epilogue, both in poetic style, stand in ring composition around the laws, though there is no visual break between them and the laws.

The laws are arranged like other works of Mesopotamian scholarship such as omen lists, king lists and god lists. Marc Van De Mieroop describes two principles: “opposition”, in which one variable of an entry is altered to make the next, as when laws 215 and 218 set a surgery that heals against one that kills, and “pointillism”, in which conditions are added to an entry or a set series is followed. The established series of domesticated beasts explains why a goat used for threshing (law 270), an animal far too unruly for the task, follows the other threshing animals. Wolfram von Soden called this way of thinking Listenwissenschaft (“list science”). The draughtsman of the relief used composition and iconography to show Hammurabi's close links to the divine realm, though whether the scene shows him receiving the laws, offering them or holding measuring tools is debated.

Reception

Ashurbanipal
AshurbanipalKeyolTranslater, CC BY-SA 4.0

The text was copied and studied by Mesopotamian scribes for over a millennium. Copies were made during and after Hammurabi's reign as it became part of the scribal curriculum; some date from 1,000 years after the stele was made, a catalog from the library of the Neo-Assyrian king Ashurbanipal lists the “judgments of Hammurabi”, and it appears in a late Babylonian (7th–6th century BCE) list of literary and scholarly texts. No other law collection became so entrenched in the curriculum. Yet no Mesopotamian legal document explicitly references it, many Old Babylonian judgments run counter to it, and since Benno Landsberger in 1950 scholars have argued that most judges appear to have paid it no attention.

Modern scholars at first met it with admiration. Jean-Vincent Scheil called it “a moral and political masterpiece”, Claude Johns titled his 1903 book The Oldest Code of Laws in the World, and much early discussion concerned its influence on the Mosaic Law. Since the mid-20th century three theories of its purpose have competed: that it is legislation, that it is a sort of law report, and that it is an abstract work of jurisprudence, a view that has gained much support within Assyriology. Reuven Yaron called the designation “Code” a “persistent misnomer”, and Fritz Rudolf Kraus placed it among works of Mesopotamian scholarship such as the omen collections.

Survival & Rediscovery

Susa
SusaCarole Raddato from Frankfurt, Germany, CC BY-SA 2.0

Some 600 years after its creation the stele was taken as plunder to Susa, the ancient Elamite city in what is now Khuzestan Province, Iran. Jean-Vincent Scheil thought that the Elamite king Shutruk-Nakhunte took it there and had several columns of laws erased to write his own legend; near the bottom, seven columns, each of more than eighty lines, were polished and erased in antiquity. Martha Roth suggests that it was taken from Sippar, where Hammurabi lived towards the end of his reign. The French Archaeological Mission under Jacques de Morgan found it in three large fragments on the acropolis of Susa between December 1901 and January 1902, and it was reconstructed.

Scheil published the editio princeps in 1902, with a transliteration and a free French translation, and editions followed in German by Hugo Winckler in 1902, in English by Claude Johns and in Italian by Pietro Bonfante in 1903. Fragments of a second and possibly a third stele were found with it, and over 50 manuscripts of the laws are known from Susa, Babylon, Nineveh, Assur, Borsippa, Nippur, Sippar, Ur, Larsa and other sites; together they fill in most of the stele's text, including much of the erased section. The stele is now displayed on the second floor of the Louvre, in Room 227 of the Richelieu wing.

Legacy

Gortyn Code
Gortyn CodeUnknown author, Public domain

Outside Assyriology Hammurabi is regarded as an important figure in the history of law and the document as a true legal code, and legal scholarship often treats its provisions as laws. A relief portrait of Hammurabi is set over the doors to the House Chamber of the U.S. Capitol, with those of 22 others noted for establishing the principles that underlie American law, and replicas of the stele stand at the Headquarters of the United Nations in New York City, the Peace Palace in The Hague, the Pergamon Museum in Berlin and the University of Chicago's Institute for the Study of Ancient Cultures. Even a word of it lasted: muškēnum, for a man of low social standing, has endured into Arabic (miskīn), Italian (meschino), Spanish (mezquino) and French (mesquin).

Its relation to later law is debated. The Middle Assyrian and Neo-Babylonian Laws resemble it closely. Since Friedrich Delitzsch's 1902 lecture in the “Babel und Bibel” debate, scholars have compared it with the Covenant Code of Exodus, which shares its casuistic form, lex talionis and provisions such as those on a goring ox; David P. Wright argues for direct dependence, but the consensus is that the similarities come from common traditions. Marc Van De Mieroop suggests that it may have influenced the Greek Gortyn Code and the Roman Twelve Tables, while acknowledging that most Roman law is not similar to it.

The Code of Hammurabi, composed c. 1753 BCE in the name of Babylon's sixth Amorite king, sets out casuistic laws between a poetic prologue and epilogue on a basalt stele now in the Louvre. Copied by scribes for over a millennium and found at Susa in 1901, it is known for “an eye for an eye”, while scholars debate whether it was ever enforced law.

References

  • Jean-Vincent Scheil, Mémoires de la Délégation en Perse, vol. 4 (1902)
  • Claude Johns, The Oldest Code of Laws in the World (1903)