Ecuador has agreed to refrain from drilling for oil in a pristine Amazon rainforest reserve in return for up to $3.6bn (£2.26bn) in payments from rich countries.
Under a pioneering agreement signed with the United Nations, the oilfields under the Yasuni reserve will remain untapped for at least a decade.
The money is about half of what Ecuador would make by selling the oil.
The Yasuni reserve is one of the most biodiverse regions on earth.
Measuring 10,000 sq km, it supports a huge variety of wildlife, incuding unique species of birds, monkeys and amphibians.
The reserve is also home to indigenous tribes, who have welcomed the deal to protect their territory from oil development.
Oil is Ecuador's biggest export, but environmental groups say the industry has caused huge damage in the Amazon region.
The agreement sets up a trust fund which will be administered by the UN Development Programme (UNDP).
Countries including Germany, the Netherlands, Norway, Italy and the US have expressed interest in contributing.
The oilfields beneath Yasuni hold an estimated 846 million barrels of crude, 20% of Ecuador's reserves.
The Ecuadorean government says keeping the oil in the ground will prevent more than 400 million tonnes of carbon dioxide from going into the atmosphere.
"This is Ecuador's contribution towards combating climate change," Ecuador's Heritage Minister, Maria Espinoza, said.
Rebeca Grynspan of the UNDP described the initiative as "innovative, audacious and important for the whole planet".
She said the UNDP was interested in replicating it in other countries, possibly including Guatemala, Vietnam and Nigeria.