The earliest civilizations formed along river valleys like the Tigris and Euphrates Rivers in Mesopotamia. These civilizations developed organized governments, religions, social hierarchies, technologies, and legal systems to manage resources and address environmental challenges like flooding. Notable early civilizations included the Sumerians, who established city-states around 3000 BC and developed innovations like irrigation systems, the wheel, writing, and mathematics. Their culture diffused and empires like Sargon of Akkad's and Hammurabi's Babylonian Empire consolidated power over time. Hammurabi created one of the first legal codes to standardize laws.