LE BOURGET, France — With the sudden bang of a gavel Saturday night, representatives of 195 nations reached a landmark accord that will, for the first time, commit nearly every country to lowering planet-warming greenhouse gas emissions to help stave off the most drastic effects of climate change.

The deal, which was met with an eruption of cheers and ovations from thousands of delegates gathered from around the world, represents a historic breakthrough on an issue that has foiled decades of international efforts to address climate change.

Traditionally, such pacts have required developed economies like the United States to take action to lower greenhouse gas emissions, but they have exempted developing countries like China and India from such obligations.

The accord, which United Nations diplomats have been working toward for nine years, changes that dynamic by requiring action in some form from every country, rich or poor.