Answer:
The Code of Hammurabi was one of the first legislative compilations of the civilized world, coming from Mesopotamia around the year 1700 BC.
This Code laid the foundations of social coexistence in Mesopotamian cities, basing its legislation on the Talion Law, by which all action required a consequence of a similar or identical nature to the contrary. Thus, there was the first documented case of retributive justice, in which people received consequences according to the actions they took.
This principle, synthesized in the phrase "an eye for an eye, a tooth for a tooth", laid the foundations of what we now know as justice, since it gave each action a logical result. Thus, today governments apply a commutative and corrective justice evolved from this ancient way of imparting justice, but continuing with the conception that every action has a necessary consequence.