Coal is back.

The reports of coal mining's death have been greatly exaggerated.

Despite a long-term downtrend, the industry appears likely to post its third consecutive quarter of growth, starting the second half of the year on the up-and-up.

Railroad companies including Omaha, Neb.-based Union Pacific Corporation (UNP - Get Report) and Jacksonville, Fla.-based CSX Corporation (CSX - Get Report) , both of which transport coal, reported gains in coal revenues in their second quarter earnings reports released this week. Union Pacific reported a 25% increase in coal revenues over the same period last year, to $619 million, while CSX reported coal revenues up 27% to $530 million. The companies are each up about the same percentage for the first half.

Coal exporters owe their recent good fortune to a reduction in global supply. China limited the working hours of its coal miners last year, which led to a drop in production of metallurgical coal and an increase in demand for the American product.

"Volume increased as global supply levels and pricing conditions extended the strong demand environment for U.S. coal exports, particularly in the metallurgical portfolio," CSX wrote in an SEC filing submitted Wednesday, July 19. The company reported a decrease in domestic coal demand, but that decrease was more than made up for by the increase in exports.

The price of metallurgical coal increased more than 100% between the third quarter last year and the first quarter of 2017, the most recent quarter for which data is available, according to the Energy Information Administration. Metallurgical coal exports from the U.S. increased by 34%, to 12.2 million tons from 9.1 million in the same time period.

Total U.S. coal exports increased 76% in that period. With 22.3 million short tons of coal exported in the first quarter, the industry returned to levels it hadn't seen since 2014.

The good news may not be sustainable. The increase in demand is largely driven by a policy decision made in Beijing that could shift with little notice.

Longer term industry trends, such as the move to natural gas and renewable sources, have not shown signs of abating, though as TheStreet pointed out recently, these alternative fuel sources still have a ways to go before completely replacing coal.

The move toward increasing automation and efficiency, however, could preclude miners from sharing in any gains wrought by the industry in the near-term.

More of What's Trending on TheStreet: