Beaver convert lotic stream habitat to lentic through dam construction, and the process is reversed when a flood or other event causes dam failure. We investigated both processes on a regulated Sonoran Desert stream, using the criterion that average current velocity is < 0.2 m s-1 in a lentic reach. We estimated temporal change in the lotic:lentic stream length ratio by relating beaver pond length (determined by the upstream lentic-lotic boundary position) to dam size, and coupling that to the dam-size frequency distribution and repeated censuses of dams along the 58-km river. The ratio fell from 19:1 when no beaver dams were present to < 3:1 after 7 years of flows favourable for beaver. We investigated the dam failure-flood intensity relationship in three independent trials (experimental floods) featuring peak discharge ranging from 37 to 65 m3 s-1. Major damage (breach ??? 3-m wide) occurred at ??? 20% of monitored dams (n = 7-86) and a similar or higher proportion was moderately damaged. We detected neither a relationship between dam size and damage level nor a flood discharge threshold for initiating major damage. Dam constituent materials appeared to control the probability of major damage at low (attenuated) flood magnitude. We conclude that environmental flows prescribed to sustain desert riparian forest will also reduce beaver-created lentic habitat in a non-linear manner determined by both beaver dam and flood attributes. Consideration of both desirable and undesirable consequences of ecological engineering by beaver is important when optimizing environmental flows to meet ecological and socioeconomic goals. ?? 2010 John Wiley & Sons, Ltd.