More than 180,000 people in northern California have been told to evacuate their homes after an overflow channel at the tallest dam in the US was weakened by heavy rainfall.
The emergency spillway of the 770 ft (230m) tall Oroville Dam was close to collapse, officials said.
The excess water has now stopped flowing.
However late on Sunday Butte County Sheriff Kory Honea said the evacuation orders remained in place.
Water levels in the reservoir have risen following heavy rain and snow after years of severe drought.
It is the first time that Lake Oroville has experienced such an emergency in the dam’s near 50-year history.