King Coal is dead, long live the king -- in this case, natural gas. President Donald Trump has vowed to reverse coal’s dwindling hold as the fuel of choice. But the trend toward gas is undermining his coal boosterism.

The president recently repealed a regulation, enacted under the Obama administration, that prevented the dumping of coal mining debris into nearby streams. That won cheers in coal regions like West Virginia, where during his election campaign last year, Mr. Trump decried what he called the “war on coal” and blamed “job-killing” environmental rules as the culprit. Indeed, U.S. coal employment, 126,000 in 1940, now is 53,000 and dropping.

While coal usage worldwide for electricity generation has accelerated over the past quarter-century as less-developed nations expanded their economies, that trend has leveled off lately. And in the U.S., coal-fired generation has dropped 25 percent since 2008. Europe is the midst of a movement to ease away from coal, in keeping with the 134-nation Paris climate accord reached last year. “They just don’t want coal in Europe,” said William Clough, chief executive of CUI Global (CUI), which monitors gas pipelines there.

Cleaner and cheaper natural gas, propelled especially by the shale boom in the U.S., has stepped to the fore. While coal and gas both emit global-warming-inducing carbon dioxide, gas puts out half as much as coal. Last year, gas used in utility plants cost as low as $16 per megawatt hour (a million watts generated continuously over an hour) compared to some $22 for coal. Mining and shipping coal is simply more expensive.

Get Breaking News Delivered to Your Inbox

“Coal jobs aren’t coming back, due to market forces, not due to regulation,” said James Van Nostrand, director of the Center for Energy and Sustainable Development at West Virginia University College of Law. “Natural gas is cheaper and more plentiful.”

In fact, for the moment at least, there is a gas glut due to a warm February in much of the U.S. and pell-mell drilling. This has helped keep prices down.

Of course, Mr. Trump is for all forms of fossil fuels, whether coal, oil or gas. But defending coal mining has had the most emotional resonance at the ballot box.

Utility company preference. In America, gas surpassed coal as the top electrical power source last year, 33 percent versus 32 percent, according to the U.S. Energy Information Administration (EIA). In 1986, coal commanded 58 percent to a 10 percent share for gas. To meet federal emissions standards, the public utility industry has been converting to gas for years.

But even if the Trump administration tries to lower air quality standards, it likely will have a tough time bringing that off. So says John Egan, a veteran environmental expert who now is with ALL4, a consulting firm. As he put it: “Having lived in this business through eight presidents now, I continue to be amazed at the checks and balances that are built into our government.”

Changing existing law will prove extremely difficult, he contended.

Regardless, public utilities are roaring ahead with plans to open more gas-fired generating plants and close or convert more coal-based facilities. The EIA reports that the industry will expand gas capacity by 8 percent over the next two years. And the power companies themselves say they prefer gas because it’s cheaper and -- perhaps with an eye to public relations -- better for public health.

The Tennessee Valley Authority, for instance, is pressing forward with an ambitious program to replace coal with gas. In 2007, gas accounted for 10 percent of the utility’s output. By 2020, that figure will grow to 23 percent. By contrast, coal was 57 percent in 2007 and is slated to shrink to 22 percent in 2020. (The rest is mainly hydroelectric and nuclear.)

Better technology. The fracking boom is responsible for a surge in gas and oil production. As a result, the U.S. now jockeys back and forth with Saudi Arabia for the title of the world’s largest energy producer. Fracking -- the shorter term for hydraulic fracturing -- involves blasting shale rock formations with highly pressurized liquids, which forces gas and oil out. While this technique has been around for a while, it has been refined in recent years.

Aiding the extraction process is the relatively newfound procedure called horizontal drilling, which allows producers to tap hard-to-get deposits more easily.

This method has made the U.S. into something unimaginable in the 1970s and 1980s -- energy independent. “Fracking was pioneered in North America,” said Andy Kapyrin, director of research at Regent Atlantic, a financial advisory firm. “We have an abundance of gas.”

Kapyrin sees possible expansion of liquified natural gas use in the nation’s truck fleet, where it now has just a small presence. But the problem is the lack of filling stations. Low natural gas prices would make conversion of trucks from gasoline and diesel more feasible, he said.

New capabilites are emerging all the time for gas. Consider CUI Global, which used to make electronic components. When CEO Clough took over the then-failing company, he steered it into the gas world by buying a British firm that had invented a new method of gauging the purity of pipeline gas. Previously, the method was to take periodic samples, but CUI can track it continuously to give a more accurate picture.

Coal mining, on the other hand, has not come up with any radically new approaches for decades. After World War II, mining companies began using boring machines to take out coal from deep seams. This surely helped reduce the mining workforce, which had used picks and shovels to extract coal.

A bill pending before Congress would increase the federal tax credit for equipment to capture carbon emissions from burning coal before they escape into the atmosphere. The measure has no shortage of skeptics. “For 40 years, I’ve heard that clean coal is right around the corner -- just give us another few subsidies,” Dan Becker, director of the Safe Climate Campaign, an environmental group, told The New York Times.

Both fuels have environmental costs, certainly. Fracking has been linked to fouling local water supplies, not to mention small earthquakes. And drilling of oil and gas, which often occurs together, sometimes involves leaked methane, which also is a harmful greenhouse gas.

Plus, numerous oil wells, not able to capture gas (which is often less profitable) for sale, simply flare it off. The GOP-controlled House of Representatives has voted to overturn an Obama rule that curbs flaring.

Expanding export capabilities. With such an abundance of U.S. gas available, there’s movement to build terminals to export the stuff, which is transported domestically via pipelines. Such a shift requires liquefying it and pouring it into large tanks that are put on ships. Europe, which is leery about getting a large amount of its gas from a frequently unfriendly Russia, is especially interested in North American liquefied natural gas.

Right now, just one LNG terminal is in operation in North America, in Cheniere, Texas. But five more are under construction, along the Gulf Coast and in Maryland, and they are expected to come online over the next four years.

Moody’s Investors Service estimates that the U.S. will become the world’s third-largest LNG exporter by 2020. In 2016, the top three LNG exporters were Qatar (32 percent market share), Australia (29 percent) and Malyasia (10 percent). The U.S. was dead last among the 17 exporters, with 0.1 percent share.

For decades, the U.S. has had a robust coal exporting business, to emerging nations in particular. In the past few years, however, it has dropped amid lower demand internationally for coal. The peak was 37.5 million short tons in 2012’s second quarter, tumbling to 12.6 million in 2016’s third period, the last number available -- a two-thirds reduction.

“Don’t believe that coal is coming back -- the market doesn’t want it,” said Winsor (Skip) Aylesworth, who manages a gas portfolio for Hennessy Funds. “It wants natural gas.”