Nicaragua has ratified the Paris Agreement on climate change, leaving Syria as the only country not to have signed up to the deal.
The move by the Central American country also leaves the US, where President Donald Trump has indicated he wants to pull out of the deal because it harms US interests, isolated as just one of two nations not supporting the agreement.
The United Nations website for the Paris Agreement, the first comprehensive accord on tackling global warming, shows Nicaragua has submitted its instruments of ratification.
It had previously refused to sign up to the deal because it did not consider it to go far enough.
The agreement, secured in the French capital in December 2015, commits countries to holding global temperature rises to “well below” 2C above pre-industrial levels, requiring emissions to be cut to net zero by the second half of the century.
Scientists have warned failure to curb dangerous climate change will lead to sea level rises, more intense storms and flooding, more extreme droughts, water shortages and heatwaves.
Climate change is also predicted to drive massive loss of wildlife and reduction in crop yields, potentially sparking conflict and mass migration.
Although Mr Trump announced his intention to abandon the Paris Agreement in June, the US cannot give notice it is quitting the deal until three years after it came into force for the country, and it then takes another year to leave.
This means the US, the second biggest polluter after China, will not formally have left the deal until 2020.
Despite the decision by the White House to pull out of the deal, many US cities and states are pushing ahead with climate action.
Analysts also suggest the shift to a low carbon economy is now unstoppable, with renewable prices tumbling and new clean technology being developed and deployed around the world.