More than 180,000 people in northern California have been told to evacuate their homes after both overflow channels at the tallest dam in the US were found to be damaged.
The emergency spillway of the 770ft (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, which lies 65 miles (105km) north of Sacramento, has experienced such an emergency in the dam’s near 50-year history.
In a statement posted on social media on Sunday afternoon, Mr Honea ordered residents to evacuate, repeating three times that it was “NOT a drill”.
The California Department of Water Resources warned that the emergency spillway next to the dam was “predicted to fail”.
Residents of Oroville, a town of 16,000 people, were told to head north.
There was gridlock on roads heading out of the town, with some evacuees complaining that they should have been given more warning.
Butte County’s official Twitter feed shared news of emergency shelters, and reported that many hotels were fully booked in the wider area.
Several hours after the evacuation order, the emergency spillway was still standing.
The California Department of Water Resources said 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 lower the lake’s level and relieve the pressure.
Helicopte California Fire Incident commander, Kevin Lawson, said officials stood by the decision to evacuate residents, rather than risk thousands of lives.
He said if the situation was not dealt with they were looking at “a 30ft wall of water coming out of the lake”.
Mr Lawson stressed that there was no danger of the entire dam collapsing.
It rises higher than the spillways, so water was not close to cascading over its top.
Sheriff Honea said that the evacuation was declared to avoid a “worst-case scenario”.
He added that no decision had been made as to when people would be allowed back into their homes, as the authorities were still assessing the risks. rs were dispatched to drop boulders to try to block the eroded area next to the spillway.
Last week, water levels in the reservoir rose sharply and the dam’s main spillway, also known as an overflow channel, was found to be damaged.
On Saturday, the water rose even higher, and the emergency spillway was activated for the first time since the dam’s completion in 1968.
However, this secondary slipway was also found to be damaged.
After a long period of drought, California has been experiencing heavy rain and increased snowfall, which has led to flooding and mudslides.
On Friday, California Governor Jerry Brown asked the Federal Emergency Management Agency to declare a major disaster.