When authorities were forced to use Oroville Dam’s emergency spillway, as recent storms caused the adjacent reservoir to swell, they expected to let water flow for at least 32 hours, 58 at the most.

But after just less than a day, the emergency spillway in California’s gold country was at risk of failing. A craterlike hole had surfaced Sunday. Officials feared the worst: That further erosion would cause the spillway to collapse, clearing the way for a 30-foot-wall of water from the overfull reservoir to engulf surrounding areas.

“It’s just amazing,” said Ron Stork, an environmentalist who warned state and federal officials 12 years ago that the emergency spillway, which is no more than a 1,700-foot concrete weir that empties into a dirt hillside, was unsafe. “It’s like the rock was melting.”

Residents were relieved to be able to return home after an evacuation order for the Oroville Dam area was lifted. (Jayne Orenstein/The Washington Post)

The hole is so massive that by Monday, according to media reports, officials had to use helicopters to drop loads of rocks into it. Meanwhile, the dam’s main spillway, a 3,000-foot structure lined in concrete, also has its own mammoth craterlike hole. Both were the result of erosion as high volumes of water came gushing from the reservoir.

The past few days’ events, which displaced nearly 200,000 area residents for about two days, raise several questions about why the infrastructure failed in the first place and what long-term fixes should happen to avoid future catastrophe.

The California Department of Water Resources, which owns and operates the dam and reservoir, has started planning for those long-term fixes, a spokeswoman said. Options that are under consideration include reconstructing the main spillway and lining the emergency spillway with concrete. Any of those options would likely cost millions of dollars. Requesting federal dollars to help with repairs is a possibility, though no decisions have been made.

Details of the reconstruction plan are still being determined, according to the agency.

“Once this is over with, once they get the water down, they’ll have to do some investigative work and determine what caused this in the first place,” said Dusty Myers, an engineer and president of the Association of State Dam Safety Officials. “How did they lose material underneath? What caused it to collapse? [The answers] will dictate what work they do.”

By Monday, officials had started filling the hole in the emergency spillway with tons of rock. That’s a temporary fix to prepare for a series of storms that are expected to hit the area over the next few days. They’ve also doubled the flow of water out of the main spillway to 100,000 cubic feet per second, with the hope of lowering the lake level by 50 feet to leave room for upcoming rain.

A view of the concrete spillway from the top of the dam. This is what 100,000 cubic feet per second looks like pic.twitter.com/GerDrq0YPz

By Tuesday afternoon, residents were allowed back into their homes, according to media reports. Officials also said that the flow of water being released from the dam is “sustainable” and has reduced the possibility of the lake overflowing, the Los Angeles Times reported.

White House press secretary Sean Spicer said during a news briefing Tuesday that President Trump is “keeping a close eye” on the Oroville Dam emergency, a “textbook example” of the country’s need for better infrastructure, the Los Angeles Times reported.

“Dams, bridges, roads and all ports around the country have fallen into disrepair. In order to prevent the next disaster, we will pursue the president’s vision for overhaul of our nation’s crumbling infrastructure,” Spicer said.

Marcia Hale, president of Building America’s Future, a bipartisan group of elected officials advocating for investment in infrastructure, agreed.

At an evacuation center in Chico, Calif., residents affected by a potential Oroville Dam flood are waiting for word on when they can return home. More rain is expected Wednesday, and officials are uncertain when the Dam will be . (Jayne Orenstein/The Washington Post)

“This is clearly a mammoth problem for the state of California,” Hale said. “But it highlights the fact that many of our dams around the country need attention. They need to be refurbished, repaired and brought into the 21st century.”

Spicer’s remarks come the day after California Gov. Jerry Brown (D) wrote a letter to the White House describing the scope of the damages and requesting for federal assistance for some of the residents who were forced to evacuate.

“I have determined this incident is of such severity and magnitude that continued effective response is beyond the capabilities of the State and affected local governments and supplemental federal assistance is necessary to save lives and to protect property, public health and safety, and to lessen the effects of this serious situation,” Brown wrote.

Brown’s letter does not address the possibility of asking for federal dollars to help pay for reconstruction.

One possible avenue for federal funding is legislation that President Barack Obama signed in December, Hale said. The Water Infrastructure Improvements for the Nation Act, or WIIN, is a major water infrastructure package that allocates $12 billion to water projects around the country.

But the cost of repairing the nation’s federal dams far surpasses that number. The Association of State Dam Safety Officials estimates that rehabilitating federal dams would cost more than $57 billion.

The possible need for federal funds for California comes at a time when the state’s relationship with the president continues to sour. Just earlier this month, Trump threatened to “defund” the state partly because of its sanctuary cities for undocumented immigrants.

During a news conference Monday evening, Brown said he’s not worried that the president’s criticism of California would prevent the state from receiving aid for the Oroville dam emergency.

Hale agreed.

“There are hundreds of thousands of people affected by this,” Hale said. “It’s an infrastructure problem, not a political problem.”

Content from Allstate This content is paid for by an advertiser and published by WP BrandStudio. The Washington Post newsroom was not involved in the creation of this content. Learn more about WP BrandStudio.