Belle Ayr, a strip mine that sits in the northeast corner of Wyoming, was the very first strip mine to open in the West back in 1972, kicking off a shifting of the coal industry from the eastern U.S. to the Powder River Basin, which straddles Wyoming and Montana.

It closed on July 1—and could be shuttered permanently, a sign of the shifting fortunes of the coal market as much as the poor management that ran it into bankruptcy.

Belle Ayr and the adjacent Eagle Butte mine shuttered a few hours after its operator, Blackjewel LLC—the country's sixth-largest coal producer—abruptly filed for bankruptcy protection. It had about $250 million in debt and less than $100,000 in the bank—not enough to cover payroll.

Get Breaking News Delivered to Your Inbox

An economic "heart attack"



Closing down a mine was unheard of in the region, but coal bankruptcies have become common. Cloud Peak Energy filed for bankruptcy in May and is searching for a buyer for its three mines in the region. Westmoreland Coal, in neighboring Montana, filed for bankruptcy last November.

"The Blackjewel bankruptcy you could consider the 'heart attack moment' in the Powder River Basin… when you realize that changes have to be made," said Robert Godby, director of the Center for Energy Economics and Public Policy at the University of Wyoming.

"There are too many mines, too little demand, and that's been driving prices down. In that situation, you'd expect the weakest most costly mines to shut down or retire first."

A decade ago, the region produced 450 million tons of coal a year, most of it sold to customers out of state. That figure has since dropped to 300 million, as less and less of the rock is used across the U.S. What's pushing it over the edge is the arrival of cheap fracked gas—which already has taken much Appalachian coal out of commission in places like West Virginia—west of the Rockies.

Now, with the extraction industry booming in West Texas, cheap natural gas is flooding the West, reaching states like Missouri, Illinois and Wisconsin, which were traditional energy markets for Wyoming.

"It's become a situation where there's no room for Wyoming coal to hide," said Steve Piper, director of energy research at S&P Global Market Intelligence.

The growth of renewable energy has also played a role. This spring, the U.S. produced more energy from solar, wind and hydropower than from coal, and it's become cheaper in most parts of the country to build a new solar or wind farm than to keep a coal plant running. With California, New Mexico, Colorado and Washington targeting 100% clean electricity, the markets for Wyoming coal is set to shrink further.

S&P Global Intelligence estimates that some 28 gigawatts of coal-fired capacity will retire in the next five years, which works out to 30 or 40 power plants.

"We're seeing a steady stream of coal plant retirements and we expect that to continue," Piper said.

Last to close

The story now unfolding in Wyoming is familiar in Appalachia, which has been left devastated by closing mines and plants in parts of Pennsylvania, West Virginia and Kentucky. What's kept Western coal relatively safer is its profitability.

While Eastern coal sits deep below the surface of the earth and is mostly accessed through deep shafts, coal west of the Rockies sits in large deposits close to the surface, and is mined by stripping away what's on top of it. The nation's 10 largest mines are in the West, where one worker, along with heavy machinery and sometimes explosives, can extract the same amount of coal it would take eight or 10 workers back East.

"The last ton of coal that comes out of an American mine will come out of the Powder River Basin," said Richard Horner, director of emerging technologies at the University of Wyoming.

For Wyoming, which voted for Donald Trump -- with his promise to put coal miners back to work -- by a 3-to-1 margin, that far-off future is now that much closer.

The state is today in a crisis, with hundreds of coal miners out of work, many unable to even cash their last checks or transfer money out of their retirement accounts, and uncertain of finding new jobs in the field. But Wyoming also faces a long-term unwinding that's not much prettier. There's no clear industry that can replace the number of jobs at the level of pay—and the revenue to the state—that coal mining has produced.

"Wyoming has huge potential for renewable energy in both solar and wind, but it doesn't create the jobs that coal does," said Mike Scott, a senior campaign representative at Sierra Club Montana. "Renewables can help, but it's not going to be a one-for-one replacement."