By Jonathan Kent
BBC, Kuala Lumpur
More than 180 countries have signed an agreement that it is hoped will slow the loss of species and habitats around the world.
The deal is aimed at protecting species such as the orang-utan
Delegates agreed to set up networks of protected areas on land and sea and to offer incentives for poorer nations to better protect the environment.
It was nearly dawn by the time final agreement was reached at the United Nations-led conference.
Campaigners say there have been some missed opportunities.
The meeting in Kuala Lumpur decided to set targets and timetables towards its goal of achieving a sharp cut in the rate at which species are dying out within six years.
By 2010 it is intended that the remaining areas of the world boasting a huge diversity of species will be part of a network of protected areas.
However, there is disappointment among those who wanted to see oceans safeguarded.
Though delegates agreed to establish link-protected areas at sea in the next eight years, no plan was agreed for doing so.
Money also remains an issue. Developing countries seem to have been appeased by promises of aid from richer nations.
But just how the conservation work is to be funded is certain to be argued over for years to come.
Campaigners for the rights of indigenous people are also disappointed that no agreement has been reached on protecting their traditional knowledge from bio-piracy.
But proposals to ensure that poor countries share in profits made from their genetic resources are expected to be presented in Brazil in two years when this conference next meets.