As a general safety rule, electricity and water shouldn’t mix. That’s getting tricky in the upper Midwest, where floodwaters are devastating parts of Nebraska, Iowa, and the Dakotas. Floodwaters have peaked in many areas, but the National Oceanic and Atmospheric Administration says that heavy rains may cause flooding to continue through the spring as snow melts. The floodwaters have damaged energy infrastructure in the region, not only knocking out power lines but also wrecking roads and railroads leading to power plants and causing massive disruptions for America’s ethanol supply.

The most dramatic example came on March 15, when Nebraska’s Cooper Nuclear Station issued an alert notification due to historic flooding that brought the reactor within three feet of closure. At the time, the plant was cut off from road access by floodwaters from the Missouri River with workers and supplies being brought in by helicopter.

Floodwaters reached 900.6ft above sea level on March 18. If they had reached 902 ft., the plant would have been forced to close. Instead, operation of the reactor continued as normal during the flooding.

Not all power plants in Nebraska and Iowa were so lucky. Portions of both states were temporarily left without power after floodwaters pushed area generators to close as a precaution. At this stage, both residents and industry are working to dry out and assess the damage. Nebraska alone is expecting nearly $1.4 billion in estimated losses and damage.

It’s too early to have a complete picture of how many homes remain disconnected from power. However, the impacts of the flooding on America’s energy industry extend beyond downed power lines, impacting domestic ethanol production as well.

Damage to rail lines has had a large impact on the ethanol industry. Iowa and Nebraska are the top two ethanol-producing states, converting locally-raised corn into ethanol that is shipped by rail for sale. About 20% of the nation’s ethanol production has been affected by the flooding, the industry says.

In Nebraska, plants are closing temporarily or cutting production because of flooding in grain storage facilities. Five of Nebraska’s 25 plants face major rail disruptions and at least four are operating at reduced capacity. Meanwhile, in Iowa, plants were forced to slow production because of difficulty sourcing grain and shipping the finished product. In both states, damage to roads and rail lines is having a large impact on the industry, one that is predicted to linger in the weeks to come.

“Some plants are supplementing by trucking, but it’s much more expensive and you can’t move near as much product as a railroad, or as fast to maintain full production capacity,” Sarah Caswell, the Nebraska Ethanol Board’s executive director told a trade publication.

Trucking is a limited option since highways are also flooded in many areas. The impact of the transportation shutdown can already be seen in fuel prices. On the Gulf Coast, ethanol is trading at 15 to 17 cents per gallon above the Chicago benchmark price. That is roughly twice the average gap for this time of year.

President Donald Trump has already approved disaster relief funding for both Nebraska and Iowa. The announcement allows the Federal Emergency Management to offer various types of recovery aid to residents and businesses in affected areas.

Follow Erin on Twitter.