In this handout provided by the California Department of Water Resources, water flows down the Oroville Dam main spillway in Oroville, California, Feb. 11, 2017. Getty Images

Just as California’s long-standing drought was finally almost alleviated, another problem hit the state in its wake. After one of the wettest seasons in recent memory, California officials estimated Wednesday they would need $50 billion to control flooding in the state.

Virtually the entirety of California had been battling drought conditions for six years, and while the drought designation hasn’t officially been lifted, the state saw more rainfall so far this year than any time in recent memory. As of January, 154 of the largest reservoirs in the state reached 97 percent of their “collective average” each day. At the same time last year, that average was less than 50 percent.

But all that rain brought its own set of problems. Infrastructure like roads and dams weren’t holding up to the weather conditions, California’s Natural Resources Secretary John Laird told the Senate Environment and Public Works Committee Wednesday.

Severe flooding in January ripped a 200 foot long, 30-foot deep erosion hole in the main spillway alongside the state’s Oroville Dam, causing nearly 200,000 residents to be urged to evacuate. Additional flooding in February led to landslides and erosion that destroyed highways and other infrastructure.

Throughout the past decade, California has allocated $11 billion toward flood control management and this year, Gov. Jerry Brown directed $50 million in funding for emergency flood response. But officials said that’s nowhere near enough. Fixing the Oroville Dam along was estimated to cost $200 million.

Additional money is necessary for other tasks: updating federal operating manuals for reservoirs, fixing and maintaining infrastructure and expanding the inspection and review of all federally owned dams. Nearly half of the 1,400 dams in the state had “high hazard potential” according to U.S. Sen. Kamala Harris. The senator noted that up to seven million people and $580 billion worth of buildings, farmlands, crops and other assets were at risk.