Hammurabi ruled Babylon, a city on the Euphrates River in Mesopotamia, from about 1792 to 1750 BCE. Farmers there used river water for their fields.
Near the end of his reign, about 280 of his laws were carved on a tall black stone. They were written in cuneiform, the wedge-shaped writing of Mesopotamia. Today they are called the Code of Hammurabi.
The laws cover trade, farming, wages, family life, stealing and injuries. Most of them describe a case and then say what should happen. Some punishments were very harsh. Punishments often depended on a person's social class. The laws name three main groups: upper-class free people, commoners and enslaved people.
At the top of the stone, a carving shows Hammurabi standing before Shamash. The Babylonians worshipped Shamash as a god of justice. In the opening words on the stone, Hammurabi said the gods had chosen him to bring justice and to protect weak people from the powerful.
Hammurabi's code is not the oldest known law code. The Code of Ur-Nammu, named for a king of the city of Ur, is about 300 years older. But Hammurabi's code is the most complete set of Babylonian laws that has survived.
Centuries later, a king from Elam carried the stone to the city of Susa, in what is now Iran. French archaeologists found it there in the early 1900s. Today it is in the Louvre Museum in Paris. Carvings of Hammurabi also appear among famous lawgivers in the U.S. Capitol and the U.S. Supreme Court building.