Historic flooding is causing huge headaches for both freight and passenger railroads in Nebraska and surrounding states.

BNSF Railway reopened its Alliance-to-Lincoln line Sunday night after it had been shut down for several days because of flooding in areas between Ravenna and Hazard and near Broken Bow.

BNSF spokesman Andy Williams said the line closed at Broken Bow on Wednesday and at Ravenna on Thursday.

Williams said there are other BNSF rail lines that are still affected, although he did not specify which ones.

Union Pacific also has seen several of its routes impacted by flooding, said Raquel Espinoza, a spokeswoman for the Omaha-based railroad.

Routes that are out of service because of flooding include Fremont to Grand Island and Fremont to Missouri Valley, Iowa; Valley to Lincoln; and Council Bluffs, Iowa, to Kansas City, Kansas, a route that runs partially on the Nebraska side of the Missouri River.

The Grand Island Independent also reported that a half dozen U.P. trains are parked at Central City and Clarks because they are unable to continue on to their destinations.

The company said in a bulletin to customers that because the flooding is so widespread, it has “very limited reroute capacity.”

“Union Pacific employees are working around the clock to restore rail service in areas experiencing widespread flooding and track washouts,” Espinoza said in an email, but she didn’t speculate at when tracks might reopen.

The track problems for BNSF and U.P. also are affecting Amtrak.

The California Zephyr, which runs from Emeryville, California, to Chicago, with stops in Lincoln and Omaha, has been unable to make the full trip because of the flooding.

Marc Magliari, an Amtrak spokesman, said the train bound for Chicago stopped in Denver on Sunday. On Monday, a train that had earlier gotten to Lincoln but had been unable to continue east returned to California.

Amtrak trains have been unable to travel between Nebraska and Chicago, said Magliari, who said he’s not sure when full service will resume.