Despite the state of California’s recent drought, nearly 200,000 residents this week faced the threat of massive flooding.

As of Feb. 14, residents near Northern California’s Lake Oroville were allowed to return to their homes after a damaged spillway at the nation’s largest dam led officials to issue mandatory evacuation orders to 188,000 people.

For the first time in history, the 770-ft-high Lake Oroville Dam reached its capacity Feb. 11, and the emergency spillway was employed. But a hole in the spillway threatened to release a 30-ft wall of water to the land below.

As a temporary measure, helicopters dropped rocks into the spillway to try to plug the hole. Rains have stopped, the lake level is dropping, and the threat of floods is no longer dire.

Now, the California Department of Water Resources, owner and operator of the dam and reservoir, is working on a long-term plan to fix the spillway. On Monday Feb. 13, California Gov. Jerry Brown requested federal assistance for displaced residents, but has not yet asked for federal funds to fix the dam.

The Washington Post reported that in 2005, three environmental groups warned state officials of the dam’s potential failures. They warned that if the concrete emergency spillway should ever be used, water would flow over the edge and onto the adjacent hillside, eroding the land and causing massive flooding—which is almost what happened in this instance. The groups requested a proper emergency spillway be constructed. Their concerns were dismissed, according to the Washington Post story, and Department of Water Resources officials questioned about the recent incident were not aware of the 2005 motion.

The Oroville Dam situation is another reminder of the importance of proactive infrastructure maintenance. Too often when water issues make headlines it is because of a potential problem that was identified early on, but not dealt with. We saw it with the lead contamination in Flint, Mich., and now, because California water officials did not heed environmental warnings, residents will likely face rate increases as the state implements a plan to fix this damaged piece of infrastructure.