President Trump’s plan to subsidize money-losing coal and nuclear plants makes no economic sense and runs counter to the free market ideology of the party he leads. But it will make the operators of those plants very happy while consumers across the country foot what could be an extraordinarily expensive bill.

The president has ordered his energy secretary, Rick Perry, to prepare immediate steps to keep these plants open. Under a plan first disclosed by Bloomberg, two rarely used laws would be invoked to require operators of the nation’s electricity grid to buy power or reserve generation capacity from unprofitable coal and nuclear plants that are scheduled to be retired.

Ostensibly, the idea is to establish a “Strategic Electric Generation Reserve” to ensure that a domestic energy supply is available in a national emergency while the Energy Department undertakes a study of risks to the energy system.

But “national security” is really just a fig leaf for subsidizing coal and nuclear plants that can’t compete anymore against natural gas and renewables like solar and wind power. The effort is built on the lie that these plants will be essential if the nation’s electric grid is attacked. It’s an obvious gift to the troubled coal industry that President Trump promised to save while a candidate. And it would be an expensive gift. One study estimated it could cost consumers as much as $11.8 billion.