COPENHAGEN, Denmark - Prime Minister Stephen Harper and other world leaders are leaving Copenhagen with a compromise climate deal and a vow to work out the details.

The agreement offers money to developing nations to help them fight global warming -- provided that they agree to open their books to international scrutiny.

Harper called it a "comprehensive and realistic" agreement, while U.S. President Barack Obama hailed it as a "meaningful and unprecedented breakthrough."

But it is not a binding agreement and does not set new greenhouse-gas reduction targets.

Instead, countries are to set their own emission reduction commitments, which would not be legally binding.

Those commitments will be the subject of further negotiation, with the aim of a final deal at next year's summit in Mexico.

It's a compromise born out of 12 days of divisive talks that saw hopes dwindle as the summit's close drew near.

Talks in the Danish capital have been marked by rifts between rich countries and developing nations, and between the United States and China -- the world's two biggest polluters.