The availability of water from river valleys was critical to the rise of many great early civilizations, but rivers also presented dangers. For example, flooding was a nearly annual event in Egypt that could cause widespread destruction. The ancients improved their engineering and learned to control flooding, or at least minimize its negative effects. Levees could keep the river within its banks in some places, while encouraging it to flood in others. A river that flooded under controlled conditions would deposit nutrient-rich silt onto fields, and thus could be harnessed for the benefit of food production.