Criminal law is the body of law that relates to crime. It regulates social conduct and proscribes whatever is threatening, harmful, or otherwise endangering to the property, health, safety, and moral welfare of people. It includes the punishment of people who violate these laws. Criminal law varies according to jurisdiction, and differs from civil law, where emphasis is more on dispute resolution and victim compensation than on punishment.
The first civilizations generally did not distinguish between civil law and criminal law. The first written codes of law were designed by the Sumerians. Around 2100–2050 BC Ur-Nammu, the Neo-Sumerian king of Ur, enacted the oldest written legal code whose text has been discovered: the Code of Ur-Nammu although an earlier code of Urukagina of Lagash ( 2380–2360 BC ) is also known to have existed. Another important early code was the Code Hammurabi, which formed the core of Babylonian law. Only fragments of the early criminal laws of Ancient Greece have survived, e.g. those of Solon and Draco.
In Roman law, Gaius's Commentaries on the Twelve Tables also conflated the civil and criminal aspects, treating theft (furtum) as a tort. Assault and violent robbery were analogized to trespass as to property. Breach of such laws created an obligation of law or vinculum juris discharged by payment of monetary compensation or damages. The criminal law of imperial Rome is collected in Books 47–48 of the Digest. After the revival of Roman law in the 12th century, sixth-century Roman classifications and jurisprudence provided the foundations of the distinction between criminal and civil law in European law from then until the present time.