The Code of Hammurabi is one of the earliest sets of laws found, and one of the best preserved examples of this type of document from ancient Mesopotamia. It shows rules and punishments if those rules are defied. It focuses on theft, farming (or shepherding), property damage, women’s rights, marriage rights, children’s rights, slave rights, and murder, death, and injury. The laws do not accept excuses or explanations for mistakes or fault (because the Code was openly displayed for all to see, no man could plead ignorance of the law as an excuse).
Hammurabi felt he had to write the code to please his gods. But unlike some other kings, he did not consider himself related in any way to any god, although he did call himself "the favorite of the gods".
The code is often pointed to as the first example of the legal concept that some laws are so basic as to be beyond the ability of even a king to change. By writing the laws on stone they were immutable and incapable of being changed. This concept lives on in most modern legal systems and has given rise to the term "written in stone".