COPENHAGEN — A two-week climate change conference billed as the most important postwar international gathering and perhaps the world's last chance to halt global warming and irreversible climate change concluded Saturday morning with a vague, nonlegal agreement that few delegates enthusiastically supported.

"In the course of adopting this decision, I know both developed and developing countries cannot all be happy. But through the adoption of the 'Copenhagen Accord,' you will be able to get everything you need, even though not all of us have achieved all you wanted," U.N. Secretary General Ban Ki Moon told reporters late Saturday morning as the conference was ending.

The accord that was finally adopted by consensus after an all-night debate and only after its initial rejection by the chair of the conference is a compromise political agreement drawn up by the United States and the U.K. and endorsed late Thursday by the major developing economies of China, India, Brazil and South Africa.