× Thanks for reading! Log in to continue. Enjoy more articles by logging in or creating a free account. No credit card required. Log in Sign up {{featured_button_text}}

GLENDIVE — The rail yard in this Eastern Montana train town is teeming with boxcars bound for the Midwest and West Coast. There are more than 300 cars of coal, 200 cars of grain. Black, jellybean-shaped tankers of Bakken crude are linked end to end for more than a mile.

They are all waiting for a turn on the only two parallel steel lines between here and the ports of the Pacific Northwest. The only railroad making that run from start to finish is Burlington Northern Santa Fe, which is laying new track at a breathless pace to catch up with demand, but is still far from its goal. The wait for service lately has been longer than the journey for some.

Shipping might be the biggest challenge for the largest cogs in Montana’s economy. Energy, mining and agriculture make up 32 percent of basic industry earnings in Montana, according to state data. The state’s economy has always run on rails, annually shipping more than $1 billion in farm commodities, $600 million in minerals and chemicals and roughly 40 million tons of coal.

But it’s been tough sledding for BNSF and its customers lately, with thousands of grain cars delayed for weeks at a time, and coal shipments so backed up that energy companies worry aloud about dwindling coal stockpiles and the challenges of keeping the lights on.