LONDON (Reuters) - A greener energy mix helped keep energy-related carbon dioxide 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 Friday.

Equipment used to capture carbon dioxide emissions is seen at a coal-fired power plant owned by NRG Energy where carbon collected from the plant will be used to extract crude from a nearby oilfield in Thomspsons, Texas, U.S. on January 9, 2017. REUTERS/Ernest Scheyder

Energy sector emissions of 32.1 gigatons were unchanged from 2015 and 2014 even though the global economy grew by 3.1 percent, 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.

Carbon dioxide emissions fell in the United States 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 percent to their lowest level since 1992 helped by higher use of shale gas and renewable energy displacing coal.

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

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

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 Celsius.