Thousands of people were told to move immediately to higher ground after a dam release prompted flash flood warnings.