For thousands of years, the Colorado River flowed above and to the east of the valley, on its way to the nearby Gulf of California. The river was higher than the valley, but it was hemmed in by its own natural levees land barriers on either bank built up over years from silt left behind by floods. With each flood, these levees grew a bit higher and harder to breach. But once in a while, the Colorado would break out and pour down into the Salton Basin, partly filling it. Then the levee break would fill with silt, the river would revert to its normal channel, and the basin would dry up again. Dams and channels on the river now prevent these cycles.
European American settlers saw that the Imperial Valley had good soils for agriculture, except for being extremely dry. In 1901, the Colorado Development Company began diverting Colorado River water into the valley for irrigation, similar to what the Colorado had done naturally thousands of times.
In 1905, the company lost control of the river during a flood, and the Colorado broke through the half-finished headgate of an irrigation ditch. The river kept widening the ditch, until almost the entire river was flowing into the sink rather than toward the Gulf of California. It took engineers and work crews until 1907 to return the river to its proper course, by which time a considerable lake had formed.