First they were a solution. Then they were a problem. Now they are being phased out.
Hydrofluorocarbons seemed like a straightforward remedy to a pressing environmental crisis of the 1980s: the depletion of the ozone layer caused by a worldwide rise in emissions of chemicals used in air conditioning and refrigeration.
Because the new compounds could do everything the old ones did — but without damaging the ozone — global policymakers turned to them as the perfect substitute. The swap was formalized in the 1987 Montreal Protocol on Substances that Deplete the Ozone Layer.
In time, the protocol would be viewed as one of the most effective international environmental agreements in history. But the new chemicals were far from perfect.
The ozone layer, which protects against the sun's harmful rays, has recovered dramatically. But climate change is much worse, and hydrofluorocarbons, or HFCs, are partly to blame.
"HFCs may be safer for the ozone, but they are exceptionally potent drivers of climate change itself," Secretary of State John F. Kerry, who helped the protocol pass in the Senate three decades ago, said recently.
And so the policymakers went back to work.
On Saturday, at a meeting in Kigali, Rwanda, leaders from nearly 200 nations reached what they hope will be another historic agreement — a global pact to dramatically reduce emissions of HFCs. Experts say that if the reductions are implemented, global temperatures at the end of this century could be cooler by nearly half a degree Celsius.
That would make the agreement, known as the Kigali Amendment to the Montreal Protocol, the single most effective contributor to reaching goals described in the landmark Paris climate accord that takes legal force next month.
The Paris accord aims to limit temperature increases to less than 2 degrees and preferably less than 1.5 degrees, but it does not include enforceable emissions-reductions goals to get there. In contrast, the Kigali Amendment is legally binding.
"This is about much more than the ozone layer and HFCs," Erik Solheim, the head of environmental programs for the United Nations, said Saturday. "It is a clear statement by all world leaders that the green transformation started in Paris is irreversible and unstoppable. It shows the best investments are those in clean, efficient technologies."
HFCs are far more potent than carbon dioxide, the most important cause of global warming. They are also the world's fastest-growing greenhouse gases, with emission increasing by about 10% each year, according to the United Nations.
That increase is driven in large part by a rapid rise in the use of air conditioning and refrigeration in developing countries, particularly India, where a growing economy has lifted standards of living for tens of millions of people but also led to increases in the emissions that cause climate change.
Negotiating the amendment took seven years. Many small island states and African nations that are experiencing the acute effects of climate change pushed for early deadlines to halt the use of HFCs. But that pressure met resistance from other developing countries.
The amendment ultimately became a compromise that puts different countries on different timetables.
The United States and other developed nations will begin to phase out HFCs in 2019. More than 100 developing countries, including China and Brazil, will begin to reduce their emissions in 2024. A few, including India, Pakistan and those in the Persian Gulf, will not start until 2028.
Each country starts with its own baseline for HFC emissions, and by 2040 every nation is expected to achieve at least an 80% reduction. The World Resources Institute, a nonprofit environmental group in Washington, estimated that the agreement will cut concentrations of HFCs in the atmosphere by 80% to 85% by 2047.
The United States and some other countries have already begun shifting to alternatives to HFCs. The Obama administration has encouraged the military and other government departments to purchase equipment that relies on alternatives when feasible. On Saturday, the administration promoted private businesses that have developed alternatives.
Nations will meet next year to discuss details for funding the transition. The agreement requires developed nations to pay more than developing ones to help all countries shift to new technologies that provide more energy-efficient cooling without using hydrofluorocarbons.
"To aid the switch to newer and safer natural refrigerants, sufficient funding will be required through the Montreal Protocol's Multilateral Fund to enable poorer countries to invest in the new technology," Benson Ireri, a senior policy advisor for Christian Aid, said in a statement Saturday. "It is vital that developed countries also share their progress on technological breakthroughs."
Environmental groups largely praised the agreement. So did President Obama, who said the agreement would avoid the equivalent of 80 billion metric tons of carbon dioxide by 2050, "equivalent to more than a decade of emissions from the entire U.S. economy."
"Today's agreement caps off a critical 10 days in our global efforts to combat climate change," the president said.
In addition to the Kigali agreement, countries also reached a deal at a meeting in Montreal to curb international aviation emissions.
"Together, these steps show that, while diplomacy is never easy, we can work together to leave our children a planet that is safer, more prosperous, more secure and more free than the one that was left for us," Obama said.
8 p.m.: This article was updated with staff reporting and the history of HFCs and details about the agreement to reduce their use.