Water storage must be built into any sophisticated system, but some simple irrigation can still be practised. Even so, irrigation systems must be active, rather than passive on the Egyptian pattern. Most likely, irrigation systems began with small springs and in small drainages, and as engineering techniques were developed, they could be applied to larger rivers and to larger areas of plains. Perhaps the earliest successful technique was to build a diversion dam. The structure is built right across the bed of the stream, and is not merely a cut in the river-bank that takes off some of the water into a canal.
Stream valleys with only seasonal flow are the best places to learn dam-building.
The dam can be built during the dry season, allowing engineers to learn how to build a successful dam, without having to master also the technique of diverting the stream. The dam can also be maintained or repaired during dry seasons. If the dam fails in flood, it does no more than restore the old flow, and is not catastrophic. It's probably not a coincidence that all the most ancient dams are built across intermittent streams, or wadis. Perennial rivers are much more difficult to dam because there is no access to the dry river bed unless the river is diverted.