China is celebrating its success fighting climate change, but the country’s growing economy is partly to blame for a sudden spike in global emissions.

The Chinese government announced on Tuesday that the country has reached its carbon emissions reductions targets for 2020 three years early. It's the result of a government war on pollution that’s accelerated the shift from coal to natural gas and renewables as well as taken steps to clean up manufacturing. But despite China's apparent success at regulating its environmental impact, the country's total carbon emissions still grew.

Not all countries have pledged to slash their overall emissions, and that list includes China. Like many fast-growing developing economies, the country’s climate pledges hinge on the concept of reducing “carbon intensity,” or the amount of carbon emitted per unit of economic growth. The greener growth strategy has been a key bargaining chip in U.N. climate negotiations. Developing economies are encouraged to sign onto international agreements under the premise that environmental goals won’t curtail expansion.

China’s carbon intensity was 46 percent lower in 2017 than in 2005, the baseline year for measurements. That means the country overachieved on a main pledge under the Paris Accord: to secure a 40 to 45 percent reduction by 2020. But GDP grew an average of almost 10 percent each year over the same period, causing the overall growth in the economy to more than offset the decrease in emissions per dollar.

China’s government celebrated early completion of national targets, but total emissions still crept up 1.7 percent in 2017.

As the world’s largest energy consumer, China has a huge impact on worldwide energy-related emissions — which jumped to a record high in 2017 after staying flat for three years, according to figures released by the International Energy Agency last week. But given the success of China’s pollution offensive, the question remains: What’s to blame for the sudden jump?

The answer is, it’s still partly China. Asian countries are behind two-thirds of last year’s increase, while other large economies, including the U.S., U.K. and Japan, achieved significant reductions.

The fact that China successfully met its targets points to huge efforts by the government to reduce coal use and boost the renewable energy sector. But coupled with strong economic growth, carbon intensity targets aren’t ambitious enough to put a real dent in the world’s greenhouse gas problem.