An international treaty originally created to save the ozone layer from destruction is now being enlisted to help tackle climate change.

Early Saturday morning, world leaders gathered in Kigali announced an agreement to curb the use of superpotent greenhouse gases used in air conditioners and refrigerators. The chemicals, called hydrofluorocarbons or HFCs, have up to 2000 times the heat-trapping ability of carbon dioxide (CO 2 ), the main planet warming gas. At a time when the world is poised to add 700 million air conditioners by 2030, the agreement could prevent nearly 0.5°C in temperature rise over this century.

The deal “shows that we can take action to protect our planet in a way that helps all countries improve the lives and livelihoods of their citizens,” said President Barack Obama in a statement hailing the agreement.

“We came to take a half a degree Celsius out of future warming, and we won about 90% of our climate prize,” says Durwood Zaelke, president of the Institute for Governance and Sustainable Development, a Washington, D.C.–based nonprofit that has lobbied for aggressive reductions in the chemicals.

The deal is arguably the most substantial advance in international climate policy since the 2015 Paris accord, in which 195 nations pledged to hold global temperature increases well below 2°C. The HFC negotiations received considerable attention from the Obama administration, which has worked to seal several climate-related agreements before a new president takes office.

U.S. Secretary of State John Kerry urged conference attendees Friday to back a strong agreement, saying it “is likely the single most important step that we could take at this moment to limit the warming of our planet.”

The deal marks the latest evolution of a treaty hailed as a model of international collaboration to address a global environmental problem. Known as the Montreal Protocol, the 1987 agreement was created to stop the destruction of the ozone layer by chemicals used in everything from hair spray to refrigerators. Since then, emissions of these chemicals have plunged as they are replaced by less-damaging alternatives including HFCs. In June, scientists announced they had detected evidence the ozone layer over the Antarctic was showing signs of recovery.

But the very chemicals used to help save the ozone layer come with a heavy price when it came to their warming potential. With the developing world aspiring to amenities such as air conditioning, scientists project that left unchecked, HFCs and similar chemicals would account for as much as 11% of greenhouse gas emissions by 2050, compared with approximately 2% today.

The new deal caps 7 years of negotiations and failed attempts to find common ground. Many of the difficulties revolved around how quickly the cuts would have to come for developing countries such as India, where air conditioners are just coming within financial reach of a growing number of people.

The final agreement creates a three-tiered system for different countries. India, Pakistan, and four Gulf states have the most leeway. They would freeze consumption of HFCs in 2028 and use consumption levels between 2024 and 2026 as the baseline to set targets for future reductions. China and other developing countries would halt growth in 2024, and use levels between 2020 and 2022 for their baseline. The developed world phase down the use of HFCs starting in 2019. The overall goal is a global 80% to 85% reduction in HFC use by 2047.

Under the deal, HFC emissions are expected to equal approximately 1.2 gigatons of CO 2 in 2050, slightly less than double today’s levels, says David Fahey, a physicist at the U.S. government’s National Oceanic and Atmospheric Administration in Boulder, Colorado, who is attending the Kigali conference as co-chair of the scientific assessment panel for the protocol. That forecast for 2050 under the new deal is well below the 4 to 5.3 gigatons worth of CO 2 projected under current regulations.

Making good on this goal will take additional research to figure out which chemicals are the best replacements. Some of the most promising candidates are flammable, raising questions about how to safely use them. At the Oak Ridge National Laboratory, a federal Department of Energy lab in Tennessee, scientists are preparing to use computer models to evaluate how these gases would spread in a room in case of a leak. Other labs are studying what would happen if they ignite. This is partly with an eye toward meeting safety standards, so that the new chemicals would be allowed in buildings, said Omar Abdelaziz, an engineer leading the Oak Ridge work.

A switch to different refrigerants won’t be a cure-all for the climate impact of a world increasingly reaching for air conditioners. As greenhouse gases, the new chemicals are a third to a quarter as powerful as their predecessors, but still hundreds of times stronger than CO 2 . And, the emissions from generating the electricity needed to power all these additional machines could outpace the gains from phasing out HFCs, Fahey cautions.

“That’s the gorilla in the room,” he says. “If you’re building power plants to run these 700 million air conditioners, now you look at the Paris agreement and ask ‘How are we going to deal with this energy demand?’”