The tropical rainforest in the eastern lowlands of Ecuador assaults the senses: the sunlight dazzles the eyes, the heat is so fierce that within seconds one's clothes are soaked in sweat. Then there are the sounds: a hypnotic symphony of frogs, crickets and other insects and birds which continues unabated day and night. There are sudden glimpses of the jungle's abundant wildlife: a spectacular flash of a blue morpho butterfly at the river's edge, a flock of green parakeets screeching.

This stunning region, which covers more than a third of Ecuador's area, almost the size of England, and which is one of the world's richest biospheres, with a huge diversity of animals and plants, some found nowhere else on Earth, faces a double threat: from the logging industry, which would strip it bare, and from the oil industry, which for nearly 40 years has been exploiting the huge resources of crude beneath the soil. Now, however, Ecuador is betting it can keep what is left of the oil in the ground and hang onto its biosphere into the bargain.

The South American country has learned the hard way that oil brings human misery and environmental devastation along with billions in export earnings. Every new oil field is an invasion that brings tens of thousands of outsiders into the forest's heart, polluting the air, soil and water, destroying wildlife, and assaulting the support systems of indigenous tribes, which can lead to their extermination. And the damage is not confined to the immediate vicinity of the wells.

Download the new Independent Premium app Sharing the full story, not just the headlines

The Via Auca is the main highway cutting through the Ecuadorean Amazonia region, and it has been a lifeline of the oil industry for nearly 40 years, slicing through the countryside like a badly healed wound, the roadside lined with hellish flares, murky waste pits and corroded pipelines. Accidents involving the pipelines are frequent, and their consequences harrowing. On the far side of the town of Dayuma, which sprang up as an oil workers' shantytown and is still riddled with crime and prostitution, one of the ageing pipelines has ruptured, sending a jet of oil shooting 30 metres into the air, staining the vegetation black all around.

The sickly stench of crude oil is overwhelming in the midday tropical heat. A house and a field across the road have also been soaked by the filthy gusher. Sebastian Ortiz, whose elderly father owns the simple wooden house by the roadside on the edge of the jungle, points out where the oil has drenched the field and seeped into the ground. Petrobel, one of many oil companies now operating in the region, has said it will pay his father US$5,000 (£3,000) towards the clean-up costs. But Ortiz says: "I don't know when he will be paid, or even if it is still safe for him to carry on living here."

Pollution is only one of the many ills that the oil business brings with it. Fernando Moreno, an anthropologist with the Ministry of the Environment, has been monitoring the oil industry's effect on the local community for years. "The people have become beggars" he says. "They have become accustomed to demanding whatever they need and more from the oil companies, just because they are in the same territory. Weighing up the benefits and drawbacks of the oil companies, I think it would be better not to have them. They lead to many bad habits, they make people avaricious, they increase the differences between people – and they are a source of contamination: for the land, the water and the people themselves."

For the last 16 years Ecuador has been embroiled in a bitter battle over a huge $27.3 billion environmental damages claim brought against US oil giant Chevron by 30,000 Amazonian inhabitants. The plaintiffs accuse Texaco (which Chevron acquired in 1993) of dumping more than 18 billion gallons of toxic waste into the rainforest between 1964 and 1990, and claim that 1,400 deaths occurred in the region as a result of the contaminated soil and water, which brought unaccountably high levels of cancer, skin and breathing conditions. The Amazon Defence Coalition, which represents the plaintiffs, says the scale of the pollution makes it the biggest environmental disaster in the world, dwarfing the 1989 Exxon Valdez oil spill and leading some experts to dub it "South America's Chernobyl". It is certainly shaping up to become the world's biggest environmental lawsuit.

Chevron robustly refutes the allegations. It says Texaco spent US$40 million on a clean-up before it handed over operations to the state oil company in 1992. Ecuador's government then signed a release freeing Chevron from any liability for subsequent damages from potential oil contamination.

Whatever the outcome of the legal battle Ecuador is now banking on a new idea to help it shed its poisonous dependency on oil. The Yasuni-ITT Initiative aims to keep the region's remaining oil reserves untapped and underground, in return for financial compensation from the international community and carbon offsets from the carbon markets.

The crux of the scheme is simple: to keep the oil beneath the Yasuni National Park where it is, in perpetuity. Covering nearly 2.5 million acres of primary tropical rainforest, Yasuni is the ancestral territory of the Waorani people and two other tribes, the Tagaeri and the Taromenane. It was named a Unesco biosphere reserve in 1989, and scientists regard it one of the most biodiverse places on earth.

It is also the home of Ecuador's largest oil reserve. But by not extracting the estimated 846 million barrels of oil in the reserve, Ecuador will keep an estimated 410 million metric tons of carbon dioxide from entering the atmosphere, making a big contribution to the fight against global warming.

It will also pledge to respect the territories of the indigenous cultures living in the national park, as well as protecting its flora and fauna. In return, the Ecuadorean Government has asked for compensation of $350 million a year for 10 years, which would be invested in environmental and social development programmes, helping the country move towards a sustainable economy.

After a slow start the plan has begun to attract serious promises of commitment. Amazon Watch, an organisation dedicated to protecting the rainforest and its indigenous inhabitants, calls it "a landmark proposal ... a precedent-setting effort by an oil-exporting nation to preserve a global biodiversity hotspot, protect indigenous rights and set the stage for its own economic and energetic shift away from fossil fuels".

Some big international players agree: Germany has offered $50 million on condition that other nations stump up similar sums. Ecuador's President Rafael Correa, and Yolanda Kakabadse, a senior member of the Yasuni commission, have been in London and continental European capitals this week spreading the word. And in December Ecuador's former chancellor Francisco Carrión, the Government's envoy on the initiative, will present it at the UN Climate Change Conference in Copenhagen.

Among Ecuadoreans themselves, the initiative is welcomed particularly by the flourishing tourist industry. With a spectacular range of natural attractions, from the Galapagos Islands to the snow-peaked Andes, Ecuador has long been a pioneer in ecotourism.

Fander Falconi the foreign minister and one of the founders of the initiative, says the scheme will work on the basis of shared responsibility, locally and globally. "What we are aiming for is global sustainability, but with a distinction drawn between those who harm the environment and those who suffer the consequences of this harm."

Luz Coloma, Yasuni-ITT's press officer, added, "Ecuador has had sad experiences with the exploitation of oil and no one wants any more environmental disasters like the Chevron-Texaco case."

On the banks of the Shiripuno river, to the west of the Yasuni National Park, is the Huaorani Ecolodge run and owned by formerly nomadic hunters who only came into contact with the outside world 50 years ago. Omene Paa, a tour guide at the lodge, tells how oil has been a curse for his people from the time "the path-cutters" first arrived. The "petrolera" companies brought disease and contaminated the water, he claims. One of his cousins died of a lung infection. Now Omene says his people, who first fought off the US oilmen with axes, just want to be allowed to live in peace. "Our battle should continue; we the Huaorani must look after our territory."