Hammurabi was a powerful Babylonian king who ruled ancient Mesopotamia from 1792 to 1750 BC. He is renowned for establishing the Code of Hammurabi, one of the earliest and most complete written legal codes, which greatly influenced subsequent legal systems. His reign marked a golden age for his empire.