In Mesopotamia, the early civilizations developed extensive irrigation systems to manage the unpredictable flooding of the Tigris and Euphrates rivers. They constructed levees and canals to divert excess water, which not only protected their settlements but also helped to irrigate their fields, allowing for more consistent agricultural production.
Similarly, the ancient Egyptians dealt with the annual flooding of the Nile River by implementing a sophisticated system of irrigation and basin farming. They used the seasonal floods to enrich their soil with nutrient-rich silt, and by creating basins to trap water, they could effectively control and utilize the floodwaters to support their agriculture throughout the year.