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 U.S. 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.
The California Department of Water Resources said earlier on Sunday afternoon that it was releasing as much as 100,000 cubic feet (2,830 cubic metres) of water per second from the main spillway to try to drain the lake.
In a statement posted on social media on Sunday afternoon, the sheriff for the area around the Lake Oroville dam ordered residents to evacuate, repeating three times that it was “NOT a drill”.
On Thursday, engineers began releasing water from the dam after noticing large chunks of concrete were missing from a spillway.
Residents of Oroville, a town of 16,000 people 65 miles (105km) north of Sacramento, were told to head north.
Other cities affected should follow orders from their local law enforcement agencies, officials said.
On Friday, California Governor Jerry Brown asked the Federal Emergency Management Agency to declare a major disaster due to flooding and mudslides brought on by storms.