BEIJING — The U.S., China and India are going back to the coal mines.

These three countries, the world's biggest coal users, have boosted coal mining in 2017, in an abrupt departure from last year's record global decline for the heavily polluting fuel and a setback to efforts to rein in climate change emissions.

Mining data reviewed by The Associated Press show that production through May is up by at least 121 million tons, or 6 percent, for the three countries compared to the same period last year. The change is most dramatic in the U.S., where coal mining rose 19 percent in the first five months of the year, according to U.S. Department of Energy data.

Get Breaking News Delivered to Your Inbox

Coal's fortunes had appeared to hit a new low less than two weeks ago, when British energy company BP reported that tonnage mined worldwide fell 6.5 percent in 2016, the largest drop on record. China and the U.S. accounted for almost all the decline, while India showed a slight increase.

The reasons for this year's turnaround include policy shifts in China, changes in U.S. energy markets and India's continued push to provide electricity to more of its poor, industry experts said. President Donald Trump's role as coal's booster-in-chief in the U.S. has played at most a minor role, they said.

The fuel's popularity waned over the past several years as renewable power and natural gas made gains and China moved to curb dangerous levels of urban smog from burning coal.

Whether coal's comeback proves lasting has significant implications for long-term emission reduction targets, and for environmentalists' hopes that China and India could emerge as leaders in battling climate change.

While the U.S. reversal is expected to prove temporary, analysts agree that India's use of coal will continue to grow. They're divided on the forecast for China over the next decade.

Industry representatives say the mining resurgence underscores coal's continued importance in power generation, though analysts caution its long-term growth prospects remain bleak.

The U.S., China and India combined produce about two-thirds of the coal mined worldwide, and the latter two nations also import coal to meet demand. India's production expanded even during coal's global downturn.

"If you look at those three countries, everyone else is irrelevant in the scheme of things," said Tim Buckley, energy finance director for the Institute for Energy Economics and Financial Analysis.

Burning coal for power, manufacturing and heat is a primary source of the carbon dioxide emissions that scientists say is driving climate change. Reducing such emissions was a critical piece of the 2015 Paris climate accord that Trump announced this month he wants to exit.

Almost every other nation continues to support the deal, including China and India. China, India and the U.S. produce almost half of global greenhouse gas emissions.

Coal accounts for almost half of greenhouse emissions from burning fossil fuels, according to the Global Carbon Project. China is by far the world's largest coal user, consuming half the global supply.

China has committed to capping its greenhouse gas emissions by 2030, and some have suggested it might accomplish that up to a decade earlier. Xizhou Zhou, a senior energy analyst with IHS Markit based in Beijing, said the recent uptick in coal production that the AP identified raises doubts about such optimism, but he added that China is still expected to meet its 2030 deadline.

"Coal consumption will continue to increase, mainly driven by Asian countries," Zhou said. "We're seeing a recovery starting this year and an increase until the mid-2020s before you see coal plateau globally."

China's production rose more than 4 percent through May, according to government figures, compared to a drop of more than 8 percent for the same period a year earlier.

Hundreds of mines shut down in China last year and the government forced others to cut back hours in a bid to reduce an oversupply of coal and boost prices. The government has since relaxed that policy and production is rebounding.

Also, as China continues to recover from a 2015 economic slowdown, it's seeing increased manufacturing and new investments in roads, bridges and other projects. That creates more demand for electricity, most of which continues to come from coal even after huge Chinese investments in wind and solar power.

Despite the announced cancellation or suspension of 100 coal plants, others remain under construction, meaning consumption of coal for power will continue to rise, Zhou said. Indonesia, Malaysia, Vietnam and Pakistan also are building new plants.

In India, where 70 percent of electricity comes from coal, production has long been increasing in defiance of global trends. The country has long argued it has both a right and an obligation to expand power generation as it extends electricity access to hundreds of millions of people who still have none. India also is seeking to reduce its reliance on imported coal by mining more of its own reserves.

An AP review of reports from the Coal Ministry of India found that mining among state-owned companies, which comprise the overwhelming majority of the nation's production, grew 4 percent in the first five months of this year.

In the U.S., the bulk of the increase occurred in major coal-producing states including Wyoming, Pennsylvania and West Virginia.

Prices for natural gas, a competing fuel in power generation, edged up in early 2017, helping coal, said Andy Roberts of the consulting firm Wood Mackenzie. That's expected to be a temporary boost given the nation's huge natural gas supplies. A cold winter in parts of the U.S. also benefited coal by increasing power demand.

World Coal Association Chief Executive Officer Benjamin Sporton acknowledged that it's been "a difficult few years for coal" but argued that the market remains strong, particularly in China and India.

"All the signs point to (a) positive upward trend," Sporton told the AP.

Still, coal's dominant role in providing electricity has been eroding. China now has more renewable energy than any other nation. Its Communist Party leaders have vowed to invest $360 billion in the sector through 2020.

India's government has said it needs no more coal-powered power plants and last month canceled 13.7 gigawatts in proposed plants, enough to power more than 10 million homes if the plants ran at full capacity. It has promoted renewables with a raft of incentives and declared that power from some solar installations should be used first when demand goes up.

Analysts said India is struggling to adjust to what appears to be a "new normal" — with its growth in electricity capacity outstripping the rise in demand. Manufacturing has not grown as quickly as hoped, and though transmission is steadily expanding to reach more households, 260 million Indians are still off-grid.

As a result, the country's power plants are running at below 60 percent of capacity on average — down from 2009, when India was using 75 percent of its capacity.

"The private sector is not undertaking any new investment in thermal energy" such as coal plants, said Ashok Khurana, director general of the Association of Power Producers in India. "There's no sense in it."

Trump's advocacy for reviving the coal-mining industry stands as an exception among the three nations' leaders. Yet the U.S. also is where coal's rebound could be briefest.

Cheap natural gas, a growing appetite for renewable energy and stricter pollution rules spurred utilities to shut down or announce retirements for several hundred U.S. coal plants. U.S. utilities that invested heavily in alternatives are considered unlikely to revert to coal, Roberts said, meaning market forces and not Trump's politics will play the biggest role in determining the industry's future.

Buckley, the energy finance specialist, said he expects the mining increases of 2017 to emerge as an anomaly and global declines will soon resume. But he noted that many existing coal plants will continue operating for years to come.

"We're not talking about the end of coal tomorrow or the end of coal next decade. We're talking about a 40-year transition," he said.