Hammurabi's Code provided justice for Ancient Babylon through a comprehensive set of 282 laws that established consistent punishments based on the social class of the offender. The Code was written in 1790 BC by King Hammurabi and was one of the first large collections of laws in the world. It embodied the principle of "an eye for an eye" by having punishments match the severity of the crime. Wealthier citizens would face fines for offenses while commoners could be subject to physical punishment. The government took responsibility for order and justice in society under Hammurabi's Code.