Mesopotamian civilization developed between 3500 BC and 539 BC in the region between the Tigris and Euphrates Rivers known as Mesopotamia. The Sumerians established the first cities in Mesopotamia around 3500 BC and developed a system of writing known as cuneiform. Power was held by independent city-states that were often in conflict over resources. Society was stratified with nobles, commoners, and slaves. Religion was polytheistic and centered around temples called ziggurats. The Mesopotamians made advances in areas like mathematics, astronomy, metalworking, and law with the Code of Hammurabi establishing strict legal principles.