CROW AGENCY, Mont. — Every few hours trains packed with coal pass through the sagebrush-covered landscape here in southern Montana, some on their way north to Canadian ports for shipment to Japan and South Korea. If the mining company Cloud Peak Energy has its way, many more trains will cross the prairie to far larger proposed export terminals in Washington State.

It’s part of a push by the nation’s coal industry, hobbled by plummeting demand as Americans turn to cleaner natural gas, to vastly expand what it sends to Asia and Europe. But the aggressive effort to rescue the $40 billion industry is running into fierce opposition from environmental groups, who say pollution caused by burning coal should not be exported.

The two sides have engaged in an increasingly pitched battle, in regulatory arenas and on the airwaves, scaring off some investors and raising concerns about the fate of the industry, which is seen as a key to economic growth in Western states like Montana and Wyoming.

“The future of the U.S. coal industry is at stake,” said Richard Morse, managing director at SuperCritical Capital, an energy consultancy. “Their future domestically is dim and demand growth internationally is very robust, so it is fair to say that a resuscitation of the industry has to come overseas.”