This article was written by Oilprice.com, the leading provider of energy news in the world. Check out these other articles.

The future for the coal industry is looking "increasingly bleak," according to an investor's note from Macquarie Research. The analysis firm also said that "a wave of bankruptcies" appear to be just over the horizon as coal mining companies deal with mounting debt and a shrinking market.

The coal markets have collapsed in spectacular fashion over the last few years due to a perfect storm of factors. U.S. coal producers first had to compete ferociously with shale gas in America's electric power sector as fracking took off about a decade ago. That forced an array of coal plants to shut down as cheap gas washed over the country. Subsequently a regulatory crack down from the federal government -- including forthcoming restrictions on greenhouse gases -- further dimmed the growth prospects of coal.

But U.S. coal producers always had the international market, and exports stepped up in concert with falling domestic consumption. Now the foreign buyers are shrinking as well. China, the one country that the coal industry could count on for ceaseless growth in coal consumption, actually burned 2.9% less coal in 2014 than it did the year before.

When China, which consumes about as much coal as the rest of the world combined, sees its level of coal burning stay flat or even fall, that raises red flags for the entire industry.

There are two other major factors contributing to the coal bust. First, a flood of new coal mines came online around the world in the last several years, creating a glut on the international market. Second, China has implemented protectionist measures to guard its domestic coal mining sector. As a result, it saw a 22% decline in coal imports at the end of 2014 from a year earlier. This has exacerbated the global glut. Still, even Chinese coal companies are struggling -- an estimated seven out of 10 are not profitable.

U.S. coal producers had predicted that the pain would be temporary and that coal markets would rebound. But that does not appear to be the case. In fact, U.S. domestic coal prices are at six-year lows, having declined to $45 per short ton this year, a nearly 20% drop off from 2014. Coal markets are also getting battered by the oil bust and broader decline in commodity prices, as well as the strong dollar, which makes exports less competitive. U.S. coal production is at its lowest level since 1993 and may decline even further.

Macquarie Research downgraded its projection for coal prices by $5 per ton, and said that the only way to bring the market back into balance was for capacity to be shut in.

Even worse, investors are starting to abandon the industry. Peabody Energy (BTU), one of the larger coal producers, had to pay a 10% interest rate on its latest bond offering. Worse off companies may struggle even to access financing, forcing them to close up shop. Arch Coal (NYSE: ACI) and Alpha Natural Resources (NYSE: ANR), for example -- once prominent and stable coal producers -- have seen their share prices plummet into penny-stock territory. The clouds are darkening over U.S. coal.

In the face of such dim prospects, Robert Murray of Murray Energy is hoping to defy the odds. He agreed to pay $1.4 billion to take over rival Foresight Energy, an Illinois coal operator. The combined company will make Murray Energy the third largest coal producer in the United States. However, to finance the deal, Murray will have to take on new debt, a risky move in such a depressed climate.

As Macquarie Research noted, the industry is shrinking. High cost producers are going to be forced out of the market. Murray plans to consolidate and survive by cutting costs -- which he has done by skirting labor and environmental standards for quite a long time. But unless coal prices rebound, and there is not a good reason to think they will, Murray Energy may too be in for a grim future.