Modern irrigated agriculture was only partially dependent on annual rainfall. It depended primarily on dams to retain water from the annual rise on the rivers resulting from rains falling upriver. For the Senegal River, these rains fell principally in the headwaters in eastern Mali and Guinea.