President Obama’s war on coal has bagged its biggest trophy to date: the bankruptcy filing by the largest U.S. coal company, Peabody Energy.

Make no mistake about it, though, Peabody’s management and that of the rest of coal industry bears much of the blame for its own demise. It ought to serve as a lesson for everyone else targeted by take-no-prisoners progressives.

Peabody’s bankruptcy filing follows that of other major coal companies including, Alpha Natural Resources, Arch Coal, and Patriot Coal. The irony is that coal is actually the world’s fastest growing source of energy, according to the International Energy Agency. So what happened?

Even before Obama vowed to “bankrupt” the coal industry in a 2008 interview with the editorial board of the San Francisco Chronicle, the coal industry had already allowed the seeds of its destruction to take root. It had failed to believe global warming hysteria was an existential threat. The industry thought the demand for cheap and reliable electricity combined with the power of politicians representing coal states would suffice as a defense against attack. But contrary to the myths propagated by global warming activists, the coal industry was never a serious funder of climate skeptics.

This strategy was completely upended when decidedly anti-coal Obama became president and Republicans lost control of Congress. Not only did an unprecedented coal industry-hating “progressive” government come to power, but also an up-and-coming new technology for producing natural gas was coming into its own. Hydraulic fracturing and horizontal drilling, commonly referred to as “fracking,” began to change the U.S. energy market.

With respect to the anti-coal Obama administration and Congress, the coal industry thought that problem could be managed. Maybe even a deal could get cut. A senior Peabody executive told me in the spring of 2009 that it supported the Waxman-Markey cap-and-trade bill because it would settle the issue and provide a path forward for the industry. At this time, much of the coal industry was operating under the illusion that carbon dioxide emissions could be affordably captured and stored underground, so the modest emissions cuts contemplated by the bill could be achieved.

Although Waxman-Markey squeaked by in a 219-212 House vote, it was never brought up in the Senate and other Senate efforts to pass a cap-and-trade bill faltered — thanks largely to the coincidental rise of the tea party. With the failure of cap-and-trade in Congress, Obama turned to the regulatory agencies he controlled to wage war on the coal industry, the most powerful of which was the Environmental Protection Agency. The EPA began issuing a series of devastating anti-coal regulations.

The coal industry was ill-prepared to fight the EPA — an aggressively arrogant, if not entirely rogue, activist agency. The EPA took advantage of the fact that its rules didn’t target the coal industry directly, but instead pressured the coal industry’s customers — coal-burning electric utilities. The EPA’s regulations forced the utilities to reduce emissions from their coal plants.

The EPA regulation known as the Mercury Air Transport Standard was so expensive for utilities to implement that it made more economic sense just to shutter many of their coal-burning power plants — a task made easier by the surge in cheap natural gas and the fact that the moribund Obama economy has not expanded in such a way as to necessitate an meaningful increases in electricity generation.

It’s not that natural gas is necessarily a less expensive way to generate electricity, but it became cost-competitive with coal. And given the regulatory and political pressure on utilities to not burn coal, utilities began switching from coal to gas wherever possible. The natural gas glut has also placed a price ceiling on coal that dramatically thinned the profit margin from coal mining. As the Obama administration has slow-walked the approval of natural gas export terminals, the gas glut is here to stay.

What about exporting U.S. coal to the rest of world, which is in the process of building 2,440 new coal plants? The coal industry does export some coal, but that has been made difficult by environmental activists who have blocked new rail lines and coal export terminals. And while China and, especially, India are burning more and more coal, they are increasing exploiting their own domestic supplies for economic reasons. So global coal prices are way down, again, pressuring export profit margins.

While the entire story of the U.S. coal industry’s demise is worthy of much more discussion, it can be summarized as follows: The coal industry’s political enemies have successfully used expensive, heavy-handed, junk science-fueled regulation which, in combination with an unforeseeable coincidental glut of cheap natural gas, has virtually broken the coal industry’s back.

What is the future of the coal industry? About one-third of our electricity still comes from coal, though that may shrink further. Under current conditions — a natural gas glut, constrained energy demand and heavy EPA regulation — there will not be much profit in coal for the foreseeable future even though we will still rely on it for much electricity.

The best scenario for what’s left of the coal industry is if Republicans win the White House and maintain control of Congress. That would likely relieve the regulatory pressure on the industry and some of the natural gas glut since Republicans would greenlight natural gas exports.

Even if Democrats win, the coal industry is not likely going away, although its management will change dramatically. As I forecast here last year, no one will leave trillions of dollars worth of coal in the ground, especially since future governments will need cash to run the welfare state. So instead, Democrat-friendly billionaires will buy coal companies for a song, politically rehabilitate the fuel, donate to their political allies, and profit.

Steve Milloy publishes JunkScience.com and is a former coal company executive.