We’ve just entered the 21st month of Donald Trump’s presidency. While the president is ending his predecessor’s war on coal at home, American taxpayers are still funding Barack Obama’s war on coal abroad.

That’s bad news for US taxpayers, trade — and national security.

In 2013, President Obama ordered the Treasury Department to use its representation on the World Bank, where the US is the largest funder, and other multilateral development banks to veto funding for coal-fired power stations. That year, the World Bank formalized a near blanket ban on coal. Last year, it extended the ban to the funding of oil and gas projects as well.

China is the big winner here. It dominates the solar-power industry. Nine out of the world’s top 10 solar companies are Chinese-controlled.

Just as important, access to cheap electricity is the single best way of boosting economic development in poor countries. Developing nations’ need for coal generation doesn’t go away simply because the World Bank refuses to fund it. Instead, they turn to — guess who? — China.

Indeed, across the board, the West is in danger of ceding development and influence to China: China is spending $1.3 trillion to build transportation and energy projects from the Indo-Pacific through east Africa and Eastern Europe.

Yet the US has one hand tied behind its back. Already China is financing coal-fired power stations in Pakistan, Bangladesh and Kenya. Although the Trump White House rescinded Obama’s anti-coal financing directive last July, it has made only halfhearted efforts to overturn the World Bank’s financing bans. Forming an alliance of like-minded countries to promote the responsible use of fossil fuels has been in the works for some months and would help force a change of policy.

But a major stumbling block appears to be the Treasury, which has day-to-day responsibility for safeguarding American interests at the World Bank and other international-aid banks. What explains the foot-dragging on a policy so obviously harmful to the United States?

The likely answer is: Much of its key leadership is drawn from Wall Street, including Treasury Secretary Steve Mnuchin — meaning they probably share Wall Street’s cultural assumptions that coal is the past and wind and solar the future, even if it’s Chinese.

There’s a revealing passage in Bob Woodward’s “Fear” on life inside the Trump White House. The president and his top economic advisers were having an argument on trade and the loss of blue-collar jobs. People didn’t really want manufacturing jobs, argued Gary Cohn, who was serving as director of the National Economic Council.

“I can sit in a nice office with air conditioning and a desk,” the ex-Goldman Sachs president continued. “People don’t want to go into coal mines and get black lung.”

“Trump wasn’t buying it,” Woodward says. The president is right and Cohn badly out of date. Surface mining overtook underground mining some time in the early 1970s. And Wall Streeters continue to ignore renewable energy’s biggest drawback: It doesn’t keep the lights on.

Meanwhile, falling natural-gas prices should be pushing Americans’ energy bills lower, but high-cost renewable energy is pushing them up. In California, which is gearing up for a 100 percent renewable-energy mandate, electric rates are already 60 percent higher than in the rest of the country. A recent survey by the Energy Information Administration found that one in five households reported reducing or forgoing necessities such as food and medicine to pay an energy bill.

It’s even worse for the world’s poor. According to a UN report, providing universal energy access could be done for less than $50 billion a year, but doubling the share of renewable energy could cost $500 billion a year.

There’s no other word for it: Foisting high-cost energy on those who can least afford it is immoral. It’s the poor who bear the heaviest burden of renewable energy.

The next World Bank meeting convenes Oct. 8. Let’s hope Mnuchin and the Treasury Department have what it takes to end Obama’s war on coal and on developing nations around the world. It’s time to lift the ban.

Rupert Darwall is the author of “Green Tyranny.”