Babylonian law is a subset of cuneiform law that has received particular study due to the large amount of archaeological material that has been found for it. So-called "contracts" exist in the thousands, including a great variety of deeds, conveyances, bonds, receipts, accounts, and most important of all, actual legal decisions given by the judges in the law courts. Historical inscriptions, royal charters and rescripts, dispatches, private letters and the general literature afford welcome supplementary information. Even grammatical and lexicographical texts contain many extracts or short sentences bearing on law and custom. The so-called "Sumerian Family Laws" are preserved in this way.
Other cultures involved with ancient Mesopotamia shared the same common laws and precedents extending to the form of contacts that Kenneth Kitchen has studied and compared to the form of contracts in the Bible with particular note to the sequence of blessings and curses that bind the deal. The Maxims of Ptahhotep and Sharia Law, also include certifications for professionals like doctors, lawyers and skilled craftsmen which prescribe penalties for malpractice very similar to the code of Hammurabi.
The discovery of the now-celebrated Code of Hammurabi (hereinafter simply termed "the Code") has made possible a more systematic study than could have resulted from just the classification and interpretation of other material. Fragments of other Ancient codes exist and have been published, but there still remain many points whereof evidence is still lacking. There survive legal texts from the earliest writings through the Hellenistic period, but evidence on a particular point may be very full for one period and almost entirely lacking for another. The Code forms the backbone of most reconstructions. Fragments of it recovered from Assur-bani-pal's library at Nineveh and later Babylonian copies show that it was studied, divided into chapters, entitled Ninu ilu sirum from its incipit (opening words), and recopied for fifteen hundred years or more.
Much Babylonian legal precedent remained in force, even through the Persian, Greek and Parthian conquests, which had little effect on private life in Babylonia; and it survived to influence Romans. The laws and customs that preceded the Code may be called "early"; that of the Neo-Babylonian empire (as well as the Persian, Greek, etc.), "late". The law of Assyria was derived from the Babylonian, but it conserved early features long after they had disappeared elsewhere.
History
Tribal influence
The early history of Mesopotamia is the story of a struggle for supremacy between the cities. A metropolis demanded tribute and military support from its subject cities but left their local cults and customs unaffected. City rights and usages were respected by kings and conquerors alike. When the ancient Semitic-speaking peoples settled in the cities of Mesopotamia, their tribal customs passed over into city law.
As late as the accession of Assur-bani-pal and Shamash-shum-ukin, we find the Babylonians appending to their city laws that groups of aliens to the number of twenty at a time were free to enter the city; that foreign women, once married to Babylonian husbands, could not be enslaved; and that not even a dog that entered the city could be put to death untried.
The population of Babylonia was multi-ethnic from early times, and intercommunication between the cities was incessant. Every city had a large number of resident aliens. This freedom of intercourse must have tended to assimilate custom. It was, however, reserved for the genius of Hammurabi to make Babylon his metropolis and weld together his vast empire by a uniform system of law.
Hammurabi's Code
By Hammurabi's time, almost all trace of tribal custom had already disappeared from the law of the Code. It is state law—self-help, blood-feud, and marriage by capture, are all absent; though code of family solidarity, district responsibility, ordeal, and the lex talionis (an eye for an eye), are primitive features that remain. The king is a benevolent autocrat, easily accessible to all his subjects, both able and willing to protect the weak against the highest-placed oppressor. The royal power, however, can only pardon when private resentment is appeased. Judges are strictly supervised, and appeal is allowed. The whole land is covered with feudal holdings, masters of the levy, police, etc. There is a regular postal system. The pax Babylonica is so assured that private individuals do not hesitate to ride in their carriage from Babylon to the coast of the Mediterranean. The position of women is free and dignified.