A FREIGHT train, its dozen cars loaded with coal covered in a light dusting of snow, snaked through the narrow valley, sometimes following the two-lane highway and sometimes crossing it. The valley was silent and snowy, and though it was two days into 2012 it could easily have been 1982, 1942 or 1922: coal has been mined in Appalachia and carried out by rail for well over a century.

And by some measures, coal is still going strong. It provides more of America's electricity than any other fuel. Production has fallen off since 2008, but it remains high, as do prices, for which thank the developing world's appetite. In Appalachia, coal remains a source of well-paid jobs in a region that needs them: for the first three quarters of 2011 employment in the Appalachian coal industry was at its highest level since 1997. And the Powder River Basin, which spans Wyoming and Montana, has become America's major source of coal in the past decade, relieving overmined Kentucky and West Virginia. The Energy Information Administration (EIA) reckons America has enough coal to meet current demand levels for the next 200 years.

But if the raw numbers look good, the trends tell a different story. Regulatory uncertainty and the emergence of alternative fuel sources (natural gas and renewables) will probably make America's future far less coal-reliant than its past. In 2000 America got 52% of its electricity from coal; in 2010 that number was 45%. Robust as exports are, they account for less than one-tenth of American mined coal; exports cannot pick up the slack if America's taste for coal declines. Appalachian coal production peaked in the early 1990s; the EIA forecasts a decline for the next three years, followed by two decades of low-level stability. Increased employment and declining productivity suggest that Appalachian coal is getting harder to find.

Toughening regulation has an effect, too. Coal-fired power plants are the source of more than one-third of greenhouse-gas emissions in America. Last July the Environmental Protection Agency (EPA) issued a rule that requires 28 states to reduce the amount of sulphur dioxide and nitrogen oxide they emit; in December came another, reducing the amount of mercury and other toxic air pollutants that power plants can puff out.

Many plants have already made the necessary upgrades and retrofits; around 53% of America's coal-fired capacity comes from units fitted with scrubbers. But others, particularly older plants, will have to decide whether such expensive upgrades are worth doing at all. Most of America's coal-fired capacity comes from plants at least 30 years old, and as much as 14% of existing coal-fired plants, accounting for 4% of America's generation capacity, will have to be retired in the next five to eight years. Energy providers face a stark choice. They can fight these regulations in court (outcome uncertain). They can retrofit old plants: plenty have done that, too. Or they can build new plants—in which case, far more are choosing plants that burn natural gas or use renewables rather than coal.

To some, regulations prove the current administration's hostility to coal. To others, however, they are a long-overdue attempt to gauge a putatively cheap fuel's true external costs. A National Academy of Sciences report estimated that the external costs unrelated to climate-change costs (to human health, crop and timber yields, building materials and recreation) of coal-fired power plants in 2005 totalled $62 billion. A study of coal's effects on Kentucky's budget in 2006 found that it contributed $528m in revenue, but its on-budget costs—training, support, repairs to the roads, R&D for the coal industry—totalled $643m. A study in West Virginia in 2009 also found the coal industry a net cost to the state.