The Sumerians settled in Mesopotamia along the Tigris and Euphrates Rivers because the seasonal floods provided fertile soil for agriculture and the rivers provided reliable sources of water. They developed irrigation canals and surplus crops allowed specialization of labor into crafts and trade. Sumerian society was composed of independent city-states with their own political and economic systems. Each city-state had its own patron god and ziggurat temple. Writing, mathematics, the wheel, plow, and technologies like metallurgy advanced under the Sumerian civilization.