A greener energy mix helped keep energy-related CO2 emissions flat in 2016 yet more needs to be done to avert a harmful rise in global temperatures, International Energy Agency (IEA) data showed on March 17.

Energy sector emissions of 32.1 gigatonnes were unchanged from 2015 and 2014 even though the global economy grew by 3.1%, the IEA estimated.

“These three years of flat emissions in a growing global economy signal an emerging trend and that is certainly a cause for optimism, even if it is too soon to say that global emissions have definitely peaked,” IEA Executive Director Fatih Birol said in a statement.

CO2 emissions fell in the U.S. and China, the world’s two largest energy users and emitters, and were stable in Europe. This helped to offset increases in CO2 emissions in the rest of the world, the IEA said.

U.S. emissions fell by 3% to their lowest level since 1992, helped by higher use of shale gas and renewable energy displacing coal.

For the first time, the U.S. produced more electricity from natural gas than from coal last year.

Emissions in China fell by 1% as coal demand declined despite its economy growing by 6.7%.

China used more renewables, nuclear and gas in power generation and spurred a switch to gas from coal in the industrial and building sectors.

Still, the IEA said keeping emissions flat was not enough to prevent global temperatures from increasing by more than two degrees Celsius above pre-industrial levels, the IEA said.

At the Paris climate conference in December 2015, 195 countries adopted a legally binding deal aimed at avoiding dangerous climate change by limiting global warming to “well below” 2 degrees Celsius.