Coal is dirty, and China's pollution problems have made the abundant and cheap fuel an easy scapegoat. That's why the country is taking steps to clean up coal, including using new technologies like gasification and shuttering thousands of old mines with lower-quality coal. A recent deal with Peabody Energy (BTU), however, could be tipping China's hand about both its direction and the future for U.S. coal.

Indonesia's problem
Indonesia is one of China's biggest coal suppliers. In fact, coal trade with China allowed the country to surpass Australia as the largest coal exporter back in 2011. That's been good news for China, which gets access to cheap coal. And Indonesia benefited since it's been able to grow along with China. However, there are problems brewing with this relationship.

China's shift toward a cleaner coal footprint is just the start of the story. U.S. miner Cloud Peak Energy (CLD) has noted that the quality of Indonesian coal has been falling. Lower quality coals burn less cleanly, which is undesirable from China's environmental perspective. That helps explain the recently announced tax on the type of coal that comes from Indonesia.

In fact, the tax appears to be targeted directly at Indonesia, since the country is the source of over 90% of the imported coal that will be affected by the 3% levy. But, at the same time, China's Shenhua Group inked a deal with Peabody for the globally diversified coal giant to to provide China with thermal coal. That coal can come from Peabody's Australian operations, but it can also come from its ultra-cheap Powder River Basin (PRB) operations in the United States.

Big in the PRB
Asian demand is what PRB-focused Cloud Peak is pinning its export hopes on. The company is using its leading position in South Korea to help build its presence in the region, recently sending test coal to Japan. If China is shifting away from Indonesian coal, Cloud Peak's export prospects could materially improve.

The deal with Peabody and the "Indonesian Coal tax" suggests that there is a good possibility of China looking to other countries to meet its coal needs. Since Cloud Peak considers Indonesia's coal the PRB region's primary competitor, any loss of market share by Indonesia is a win for PRB coal—which is all that Cloud Peak mines.

Another big PRB miner is Arch Coal (NYSE: ACI). If China gets a taste for PRB coal from its Peabody deal, both Arch and Cloud Peak could quickly see increased demand. That would be more beneficial for Arch right now because it has more export capacity than Cloud Peak. Cloud Peak has to wait for new ports to be built before it can really ramp up its exports.

Arch, meanwhile, could use a little good news. The company's ill-timed expansion into metallurgical coal left it with a relatively heavy debt load and forced it to cut its dividend to preserve liquidity. While that's left the shares severely depressed, it also means there's more upside potential when coal markets recover. If China starts looking to PRB coal for its energy needs, Arch's upside could be material.

Watch China and U.S. exports
China is the world's largest consumer of coal. The moves it makes are important to watch. At the same time, the United States is a relatively small player in the thermal coal export market. If a renewed focus on the environmental impact of coal pushes China more and more toward higher quality coal, Indonesia is likely to be a big loser—but any market share loss will be made up by other players.

It seems that Peabody has put itself at the front of the line to benefit from Indonesia's woes. But Arch and Cloud Peak are also well positioned with cheap PRB coal on the West Coast. Keep an eye on both the U.S. export market and China's moves. China could be just what Peabody, Arch, and Cloud Peak need to turn the corner.