As the King of Babylon, Hammurabi implemented a legal code of conduct to guide his society. He felt guided by the Babylonian god of justice, "Samash", to provide for his people a legal code that would provide protection against injustice for all classes of people. Considering the time period when this was written, Hammurabi produced a document that was particularly civilized. This passage from the Code of Hammurabi Epilog condenses his concerns:.
. . on my breast I cherish the inhabitants of the land of Sumer and Akkad; in my shelter I have let them repose in peace; in my deep wisdom have I enclosed them. That the strong might not injure the weak, in order to protect the widows and orphans, I have in Babylon the city where Anu and Bel raise high their head, in E-Sagil, the Temple, whose foundations stand firm as heaven and earth, in order to bespeak justice in the land, to settle all disputes, and heal all injuries, set up these my precious words, written upon my memorial stone, before the image of me, as king of righteousness.
Specifically, the Code of Hammurabi mostly deals with business, property rights, criminal punishment, and agriculture. Agriculture was extremely important in Mesopotamia in the time of Hammurabi, so the Code of Hammurabi sets down the rights and responsibilities of landlords and the farmers that worked the land. Many provisions of the code tend to protect the poor. Item 48., states, "If any one owe a debt for a loan, and a storm prostrates the grain, or the harvest fail, or the grain does not grow for lack of water; in that year he need not give his creditor any grain, he washes his debt-tablet in water and pays no rent for this year.".
The code of Hammurabi did not grant universal equality to all levels of Mesopotamian society. It is recognized as being more fair and equal than any form of legal code known at the time, and more fair and equal than many societies to come for the next 2000 years.