Because of the 1987 Montreal Protocol, NASA was able to call a video about the ozone layer “The World Avoided.” In a model for international agreements, the world’s nations came together in response to research revealing a dangerous trend of ozone destruction driven primarily by chlorofluorocarbons—used as refrigerants and, yes, propellants in aerosol cans. The agreement that ensued dealt with the problem.

There’s a common misconception that global warming and ozone depletion are one and the same, but they are separate phenomena with separate causes. The two phenomena do actually intersect with each other, however. Apart from destroying stratospheric ozone, some chlorofluorocarbons are tremendously potent greenhouse gases. The concentration of these gases in the atmosphere is very, very small, but their potency makes them more than a rounding error for climate change. That means the Montreal Protocol has also helped us avoid a bit of planetary warming.

Chlorofluorocarbons were largely replaced with hydrofluorocarbons, which are ozone-safe. Unfortunately, they're also extremely potent greenhouse gases. UN talks eventually started up again with the goal of pushing a second transition to chemicals that are safe on both counts. As more and more air conditioners come online in developing economies like India, the leakage of hydrofluorocarbons into the atmosphere has been growing rapidly, adding urgency to the talks.

Several years ago, the Obama administration put its weight behind the push for this addition to the Montreal Protocol, getting US industry onboard early. On Saturday, the world got a deal done in Kigali, Rwanda.

Under the legally binding agreement signed by almost 200 countries, nations will start phasing out the production and use of hydrofluorocarbons over the next decade or so—in 2019 in the US and Europe, in 2028 in places like India. The deal involves some financing from wealthier countries to help poorer countries with the transition to alternative chemicals, which are currently more expensive.

The cuts could shave almost 0.5 degrees Celsius (nearly 1 degree Fahrenheit) off global warming by 2100—a significant victory entirely separate from efforts to address energy emissions.