Nearly everything Donald Trump said about energy during the second presidential debate, he got entirely wrong. “Energy is under siege by the Obama administration. Under absolutely siege,” Trump said, responding to a question from an undecided voter (the instantly iconic Kenneth Bone) on energy policy. “The EPA, Environmental Protection Agency, is killing these energy companies. And foreign companies are now coming in buying our—buying so many of our different plants and then rejiggering the plant so that they can take care of their oil. We are killing, absolutely killing our energy business in this country.” Not that Trump’s running mate did any better on the subject during his own debate a few nights earlier.

The notion that the Obama administration—and by association, Hillary Clinton—is waging a war on coal is now a key tenet of the Republican creed. Trump continued this drumbeat. “And you look at our miners. Hillary Clinton wants to put all the miners out of business. There is a thing called clean coal. Coal will last for 1,000 years in this country.” But the Environmental Protection Agency and the government are putting coal mines out of business, he charged. And Trump extended the critique to the energy sector at large, accusing the administration of animus “toward miners and others in the energy business. It’s a disgrace.”

To the extent energy is under siege, the hordes at the walls are actually other participants in the energy sector. Trump is right that lots of energy companies are suffering—especially their stockholders and bondholders. As SNL Energy noted earlier this spring, nearly 44 percent of coal production is being conducted by coal companies in bankruptcy. And there has been lots of corporate carnage in the oil and gas fields of North Dakota, Texas, and Pennsylvania. According to Standard & Poor’s, 53 of this year’s 83 U.S. corporate debt defaults have taken place in the energy and natural resources sector.

But these results can largely be ascribed to what might be called catastrophic success on the part of the private sector—not to government regulation. The energy sector is suffering from too much production of oil and gas, not too little. And that increased production, in turn, is hurting coal.

Coal is undeniably the sick man of the energy industry—the amount mined has fallen for five of the past nine years, and is off by about 20 percent so far this year. Regulations have something to do with this trend. But as I noted last week, utilities’ shift to cheap, abundant, cleaner-burning natural gas—along with state (not federal) mandates to use more renewable energy—are responsible for virtually all of the decline in coal consumption.

On the other hand, in some ways, the U.S. oil and natural gas industries are remarkably healthy—not that that would ever square with Trump’s evocation of oil fields under federal siege. Production of natural gas and oil has soared in the Obama years. For that we can thank the aggressive raising of capital, the refinement and continuous improvement of fracking, and the government either encouraging the trend or largely staying out of the way. Environment regulations have not tamped down drilling for oil and natural gas in any meaningful way. Oil production has risen in each of the first seven years of the Obama administration, and the 2015 production total was nearly twice that of 2005. (Oil production is down a bit so far in 2016, largely due to low prices.) Natural gas production has likewise boomed, rising 40 percent between 2005 and 2015 to a record 32.9 trillion cubic feet.

The oil and natural gas industries are suffering because they are living through the ugly end of a typical American boom-and-bust cycle (the kind with which Trump is intimately familiar). The success of fracking, combined with muted demand for both power and transportation fuel, means the U.S. has vastly increased domestic supplies without a concomitant rise in demand. That has pushed prices down dramatically. So a host of companies that raised debt and capital in anticipation of oil selling for $60 or $70 a barrel have been schnitzeled as oil has lingered in the $40- and $50-per-barrel zone. And all the afflicted companies haven’t simply shut down. Again, in a process Trump knows well, they have shed debts and obligations, fixed their balance sheets, merged and consolidated, and continued to produce energy.

Federal policies that support renewable energy, electric vehicles, and lower emissions certainly contribute a small amount to the tamping down of demand for fossil fuels. But the overwhelming amount of the problems we’ve seen stem from excess production and the fact that it is hard to find external markets for natural gas and oil. Here, too, the Obama administration has actually helped the industry. Last December, Obama signed Republican-backed legislation that would end the longstanding export ban on crude oil. And with the government’s permission, companies are now systematically exporting natural gas and products derived from natural gas.

That’s some siege.

For her part, Hillary Clinton got something wrong when talking about energy. “You know that we are now for the first time ever energy-independent,” she said in the response to the same question. That’s not quite true. Yes, oil imports are way down, in both volume and total cost. But the U.S. still has a trade deficit in petroleum products—$84 billion in 2015, but only $33 billion through the first eight months of 2016. In 2008, when President Obama was elected, petroleum products accounted for about half of the U.S. trade deficit. Now, they account for less than 15 percent of it. Oil is actually one of the areas of trade where the U.S. is “winning,” as Donald Trump would define it. But we’re not quite independent.

As for Trump’s line about foreign companies “buying so many of our different plants and then rejiggering the plant so that they can take care of their oil,” I have no idea what he’s talking about. Then again, neither does he.

Read more Slate coverage of the 2016 campaign.