Store Banner Desktop

Store Banner Mobile

Hammurabi (standing) receiving his royal insignia from the deity Shamash. Source: Hammurabi/CC BY 3.0

Hammurabi and his God Given Code of Laws

Getting your Trinity Audio player ready...

“At that time, the gods Anu and Enlil, for the enhancement of the well-being of the people, named me by my name: Hammurabi, the pious prince, who venerates the gods, to make justice prevail in the land, to abolish the wicked and the evil, to prevent the strong from oppressing the weak.”
(Hammurabi’s Code of Laws, Prologue)

Hammurabi, the sixth king of Babylon, left an enduring legacy in the ancient world with his famous Code of Laws. Spanning a range of legal and societal matters, Hammurabi's Code is remarkable not only for its comprehensive nature but also for its claim of divine origins. This article delves into the historical context, key provisions, and significance of Hammurabi's Code, shedding light on its impact on ancient Mesopotamian society and its enduring influence on subsequent legal systems.

Although Hammurabi’s Code of Laws is one of the most famous collections of laws from the ancient world, it is certainly not the oldest. In fact, it is preceded by at least two other codes of laws, namely the Laws of Ur-Namma (c. 2100 BC, Ur) and the Laws of Lipit-Ishtar (c. 1930 BC, Isin). It may be pointed out these ancient Mesopotamian texts are not legal codes in the modern sense, i.e. collections of written laws compiled according to specific subject matters (civil code, penal code, etc.), but were rather compilations of laws “carved in stone”. Although these collections preceded that of Hammurabi’s, it cannot be said that the latter borrowed directly from the former, as these were legal rules of political entities that were independent of each other.

Hammurabi, Ruler of the First Dynasty

So, who was Hammurabi? Hammurabi (reigned from 1792-1750 BC) was the sixth ruler of the First Dynasty of Babylon. During his long reign, he oversaw the great expansion of his empire, conquering the city-states of Elam, Larsa, Eshnunna and Mari, an act which he regarded was part of a sacred mission to spread civilization to all nations. By ousting the king of Assyria, Ishme-Dagan I, and making his son pay tribute, he made Babylon a major power in Mesopotamia.

Hammurabi is well-known for having issued the Code of Hammurabi, which he claimed to have received from Shamash, a solar deity and the Babylonian god of justice. 

The Mesopotamians believed Shamash was omniscient during the day which also meant he was able to see through deceit and deception. And so, god Shamash (also referred to as Utu) was venerated as the god of truth and justice and served as the judge of both men and gods. He was a divination god, resting at night but also associated to the underworld.

Hammurabi (standing) receiving his royal insignia from the deity Shamash. (Hammurabi/CC BY 3.0)

Hammurabi (standing) receiving his royal insignia from the deity Shamash. (Hammurabi/CC BY 3.0)

Hammurabi streamlined administration, commissioned huge building projects, improved agriculture, repaired and rebuilt infrastructure, enlarged and heightened the walls of the city, and built extravagant temples dedicated to the gods. His focus was also military and conquest, but according to his own writings, his main goal was to improve the lives of those who lived under his rule. 

By the time of Hammurabi’s death, Babylon was in control of the whole of Mesopotamia, although his successors were not able to maintain this control. This may be due to the lack of an effective bureaucracy, as his active participation on regional wars meant that he did not focus on establishing an administrative system that would ensure the continual running of his empire after his death.

A Sense of Order and Earliest Preservation of Law

As one of the earliest recorded legal systems. Its existence demonstrates the ancient Mesopotamians' recognition of the need for a set of laws to regulate society.

Hammurabi's Code is often considered one of the Codification of Laws, as it was among the first attempts to compile and codify laws.

While it was not organized into specific subject matters like modern legal codes, it marked a significant step forward in the systematic recording and preservation of laws. This approach laid the foundation for later legal codifications, providing a model for structuring legal principles and penalties.

As a result, it set a precedent for future legal codes and inspired the development of subsequent legal systems in various civilizations.

Left; Votive monument with Hammurabi raising his arm in worship and Right; detail of Hammurabi’s Code of Laws.  (Left; © Marie-Lan Nguyen /Wikimedia Commons Right; Gabriele Barni/CC BY 2.0)

Left; Votive monument with Hammurabi raising his arm in worship and Right; detail of Hammurabi’s Code of Laws.  (Left; © Marie-Lan Nguyen /Wikimedia Commons Right; Gabriele Barni/CC BY 2.0)

Crimes and Penalties

Despite the rapid disintegration of his empire, Hammurabi’s Code of Laws has survived the ravages of time, though it was only in the 20th century that they were rediscovered by archaeologists. These laws defined various types of crimes and the penalties to be applied. For instance,

“If a fire breaks out in a man’s house, and a man who came to help put it out covets the household furnishings belonging to the householder, that man shall be cast into that very fire.”
(Hammurabi’s Code of Laws, Laws, 25)

Despite the ‘eye for an eye’ type of punishments such as the above, Hammurabi’s Law Codes allowed different punishments to be meted out to persons of different social ranks. Thus, for instance,

“If an awīlu (upper class person) should blind the eye of another awīlu, they shall blind his eye. If he should break the bone of another awīlu, they shall break his bone. If he should blind the eye of a commoner or break the bone of a commoner, he shall weigh and deliver 60 shekels of silver. If he should blind the eye of an awīlu’s slave or break the bone of an awīlu’s slave, he shall weigh and deliver one half of his value (in silver)” (Hammurabi’s Code of Laws, Laws, 196-199)

Therefore, it can be seen that in some cases, an offender’s punishment depended on the social status of his victim.

Although some of the punishments are very harsh by modern standards – for example ‘If a son strikes his father, his fingers shall be cut off’ – they were actually intended to prevent even worse acts of retribution carried out by the wronged person. 

A depiction of king Hammurabi. (Mbmrock/ CC BY-SA 4.0)

A depiction of king Hammurabi. (Mbmrock/ CC BY-SA 4.0)

Lasting Legacy

Hammurabi was worshipped as a god by his subjects and was highly revered throughout his kingdom. Commemorations during his lifetime gave thanks for three main achievements: bringing victory in war, establishing peace, and fighting for justice. However, after his death, his military accomplishments were minimized and his reputation as a merciful king and the ideal lawgiver became the central aspect of his legacy.

Top image: Hammurabi (standing) receiving his royal insignia from the deity Shamash. Source: Hammurabi/CC BY 3.0

By Ḏḥwty


Andrews, E., 2013.  8 Things You May Not Know About Hammurabi’s Code.  Available at:

Darling, L. T., 2013.  A History of Social Justice and Political Power in the Middle East: The Circle of Justice from Mesopotamia to Globalisation. London; New York: Routledge.

Encyclopaedia Britannica, 2014.  Hammurabi. Available at:

Hammurabi, Hammurabi’s Code of Laws

Roth, M. T. (trans.), 1995.  Law Collections from Mesopotamia and Asia Minor. Atlanta: Scholars Press.

The Free Dictionary, 2014.  Code. Available at:

Wright, D., 2009.  Inventing God’s Law: How the Covenant Code of the Bible Used and Revised the Laws of Hammurabi. Oxford: Oxford University Press.

Yaron, R., 1969.  The Laws of Eshnunna. Jerusalem: The Magnes Press, The Hebrew University.



Amazing to me that the God Shamash, god of justice, has another name Utu which is the Maori (New Zealand’s indigenous people) word for revenge!


Amazing to me that the God Shamash, god of justice, has another name Utu which is the Maori (New Zealand’s indigenous people) word for revenge!


i were expected very detailed article in the issue

Tsurugi's picture

Excellent article, and the observations at the close are both refreshing and insightful.

I have one comment regarding the following statement: "This may be due to the lack of an effective bureaucracy..."
If it was due to that it is no fault of Hammurabi's, because I don't believe such a thing has ever or will ever exist. :)

I remember reading about this is in schoold but we did not dive to much into it. I wish this article could have been longer so I could read more about it but I can also do some research on my own if I have time. I, however, did not know that there were older codes of laws, I was under the impression that Hamurabi;s code was the odlest one know, but it has been a while since I read about this in school.

dhwty's picture


Wu Mingren (‘Dhwty’) has a Bachelor of Arts in Ancient History and Archaeology. Although his primary interest is in the ancient civilizations of the Near East, he is also interested in other geographical regions, as well as other time periods.... Read More

Next article