People at swimming pools in São Paulo, Brazil on a hot winter day last September.

Earth had one of its warmest years on record in 2017, according to two new analyses from NASA and the National Oceanic and Atmospheric Administration.

A report from NASA released Thursday said 2017 was the second-warmest year on record, while another NOAA report that used different methods said 2017 was the third-warmest year.

Both agencies are in "strong agreement" that the data indicate a long-term warming trend around the world.

Despite cold weather in certain parts of the world, overall the planet has been rapidly warming over the last four decades, said NASA Goddard Institute for Space Studies director Gavin Schmidt.

2016 was the planet's warmest year since record-keeping began in 1880, and climate scientists attributed that in part to a strong El Nino Southern Oscillation climate pattern.

But El Nino was not behind the warm temperatures in 2017.

NASA's release said the rise in Earth's temperature over the long term has been "driven largely by increased carbon dioxide and other human-made emissions into the atmosphere."