Rivers were important water sources, so most ancient civilizations settled on the coast or riverbanks. The earliest recorded civilizations were established along rivers: Egyptians along the Nile, Harrapans along the Indus Valley, Samarra along the Tigris.
Early attempts to control the river include the Sadd Al-Kafara dam in Egypt, the walls of Memphis (built to protect the city from the Nile's annual flooding). Dams were also built by Mesopotamian civilizations and the Romans.