More than 180,000 people in northern California have been told to evacuate after two overflow channels at the US's tallest dam were found to be damaged, BBC reports.
The 770ft (230m) high Oroville Dam is not itself at risk of collapsing, but its emergency spillway was close to caving in, officials said.
Officials feared the damaged spillway could release large amounts of floodwater downstream.
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.