YASUNÍ NATIONAL PARK, Ecuador — In a swath of lush Amazon rainforest here, near some of the last Indigenous people on Earth living in isolation, workers recently finished building a new oil platform carved out of the wilderness.

Teams are drilling in one of the most environmentally important ecosystems on the planet, one that stores vast amounts of planet-warming carbon. They’re moving gradually closer to an off-limits zone meant to shield the Indigenous groups. It turns out that some of the country’s largest oil reserves are found here, too.

Ecuador is cash-strapped and struggling with debt. The government sees drilling as its best way out. The story of this place, Yasuní National Park, offers a case study on how global financial forces continue to trap developing countries into depleting some of the most biodiverse places on the planet.

Countries like Ecuador are “against the wall,” said María Fernanda Espinosa, an Ecuadorean diplomat and a former president of the United Nations General Assembly.

Drilling in this part of the rainforest wasn’t Ecuador’s first choice. In 2007, Rafael Correa, the president at the time, proposed a novel alternative that would have kept the oil reserves in a parcel here designated as Block 43, estimated then at around a billion barrels, in the ground.

Under that plan, countries would have created a fund of $3.6 billion, half of the oil’s estimated value, to compensate Ecuador for leaving its reserves untouched. Supporters of the idea said it would have been a win for the climate, for biodiversity and for Indigenous rights. And, they said, it would have been a precedent-setting moral victory: A small, developing nation would have been paid for giving up a resource that helped make places like the United States and Europe so wealthy.

But, after early fanfare, only a pittance in contributions trickled in. Ecuador turned to China for loans, around $8 billion over the course of the Correa administration, some to be repaid in oil.

“Now that the global trend is to abandon fossil fuels, the time has come to extract every last drop of benefit from our oil, so that it can serve the poorest while respecting the environment,” the current president, Guillermo Lasso, said last year.

Other nations are also looking to new oil development, even though the International Energy Agency has said countries must stop new projects to avoid catastrophic climate change. Developing nations say they should be allowed to keep using fossil fuels, since, historically, they’re least to blame for climate change. But these countries are often home to the very ecosystems that are most valuable in helping to stave off global warming and biodiversity collapse. The Democratic Republic of Congo, for example, has put up for auction oil blocks that include rainforest, peatlands and parts of a sanctuary for rare mountain gorillas.

In Ecuador, the oil industry insists that drilling can occur with little damage, but scientists say that even the best cases so far have led to deforestation and other pressures.

More oil extraction couldn’t come at a worse time for the world’s forests. With the Amazon weakened by deforestation and climate change, scientists warn that the forest is approaching a threshold beyond which it could degrade into grassland. Some areas are already emitting more carbon than they store, a ticking time bomb of greenhouse gases.

“Ecuador’s greatest wealth is its biodiversity,” said Carlos Larrea, a professor at Simón Bolivar Andean University in Quito, the capital, who helped to design the failed fund. The destruction of Yasuní, he said, “is suicide.”

Yasuní brims with life. It trills, squawks and hoots. The world’s tiniest monkeys, called pygmy marmosets, scamper over branches, and the world’s largest rodents, capybaras, loll along riverbanks.

In one parcel of just 25 hectares, or about 60 acres, scientists have documented roughly 1,000 species of native trees, around the same number that exist in the entire United States.

No region of land on Earth is more rich in biodiversity than this one, where the Amazon climbs into the foothills of the Andes, according to scientists. The genetic diversity is a vast, untapped resource that could unlock cures for diseases and open doors to technological innovations. But the fragmentation here has already started.

“Nature always loses,” said Renato Valencia, a forest ecologist at Pontifical Catholic University of Ecuador who has studied this area for decades. “When it comes to economic matters, that’s the rule.”

Even under the industry’s best practices, the ecosystem has suffered.

In the 1990s, as oil production began near those 25 hectares, executives went out of their way to protect nature, scientists said. They strove to keep deforestation to a minimum and hired scientists to study the local biodiversity.

“We kept hoping that this would be an example whereby oil development could coexist with a wild forest and its biota,” said Robert S. Ridgely, an ornithologist who led the study on birds. “But it just didn’t turn out that way.”

The worst environmental damage came not from oil contamination, the scientists said, but from the company’s road. Despite strict controls, it attracted new Indigenous Ecuadoreans to the area, who cut down trees to grow crops. Local hunters started killing more animals to sell, including threatened species. Illegal logging is a problem.

The New York Times reached out to authors of the company-funded studies. Six of seven responded, each expressing grave concern about the new drilling in Block 43.

“It is going to be another complete disaster,” said Morley Read, a zoologist who conducted the study on reptiles and amphibians.

People are at risk, too. In Yasuní, an unknown number of men, women and children live in what’s known as voluntary isolation, rejecting contact with the outside world. They are called the Tagaeri and the Taromenane.

Their reserve and a related buffer zone are off-limits to drilling, but government officials have discussed shrinking the protective zone to reach more oil.

“That’s where nature put it,” said Fernando Santos, the Ecuadorean energy minister, in an interview in November. “And that’s where we need to get it from, albeit very carefully.”

Per capita gross domestic product almost doubled in the following fifty years, a slightly faster pace than Latin America as a whole. Many credit oil.

“There has been a change from a very backward Ecuador to an Ecuador that has progressed not to the first world but to the middle — a breakthrough,” Mr. Santos, the energy minister, said.

But as oil revenues grew, global markets allowed the government to borrow more heavily.

“The thing that you see in Ecuador is that whenever Ecuador has experienced the oil booms, that’s when the debt of Ecuador has skyrocketed,” said Julián P. Díaz, a professor of economics at Loyola University Chicago.

Economists say poorer countries get easily caught in this kind of debt trap because they have less robust economies to begin with and typically borrow at elevated interest rates, since they’re considered riskier.

“Obviously we are in monstrous debt,” Mr. Santos said. But, while he recognizes that oil played a role in creating the problem, he also sees oil as the solution. With more drilling and mining development, he said, “the country will be able to get out of debt.”

However, economic gains have barely trickled down to communities that have lived close to oil development for decades. More than half the people who live in the Ecuadorean Amazon, where the vast majority of the country’s oil comes from, are poor.

Ramiro Páez Rivera, an executive who has worked for several oil companies in the area, said it was the government’s job to put oil taxes to good use.

“We pay millions of dollars,” he said. “People don’t even have potable water.”

Last year, thousands of Indigenous Ecuadoreans staged an 18-day strike that stopped much of the country’s oil production. “We don’t want oil,” said Leonidas Iza, president of the Confederation of Indigenous Nationalities of Ecuador, which helped lead the protests.

But even as protesters demanded an end to the president’s plans to double oil production, they also insisted the government bring down fuel prices, something that typically creates more demand.

“There is a harsh reality that in these 50 years our economies have become dependent on oil,” Mr. Iza said.

The proposal in 2007 to leave the oil in the ground was an effort to chart a different path. A surprising figure pushed the proposal: the minister of energy, Alberto Acosta.

It was “the minister of petroleum proposing not to extract the petroleum,” Mr. Acosta recalled. As a younger man, he’d accepted as gospel that oil was the key to lifting Ecuador out of poverty. But after decades of production, the biggest effects he saw were pollution and deforestation.

So Ecuador asked the world for $3.6 billion, half of what it predicted it would make by selling the fuel. At first, there were positive signs. The United Nations agreed to manage the fund. Germany and Italy pledged resources.

But some governments didn’t trust the president, Mr. Correa, a populist who had intentionally defaulted on foreign debt. Many seemed perplexed by the idea of paying a country not to do something. Mr. Correa was accused of blackmail because he planned to drill if the money didn’t materialize.

As the Yasuní proposal lost momentum, China took on a growing influence in Ecuador, stepping in with billions of dollars in loans, some to be repaid in oil.

In the end, the Yasuni proposal only raised about $13 million. “The world has failed us,” Mr. Correa told the nation in August 2013.

Mr. Correa now lives in Belgium and faces arrest in Ecuador because of a corruption conviction.

After the failure of the Yasuní project, a state-owned oil company, now part of Petroecuador, started knocking on doors in Indigenous communities throughout Block 43, offering money, housing and sanitation projects.

Today, twelve platforms dot the forest, connected by a gravel road.

From each platform, workers are drilling dozens of wells, bent in different directions to avoid further deforestation. Hundreds of workers toil in shifts, 24 hours a day.

“We are making an aggressive push given the limits of what can be done there,” said Hugo Aguiar, Petroecuador’s general manager.

However, it’s unclear how long the oil in Block 43 will be worth the investment. The heavy oil is less valuable and emits more carbon than lighter types. Over 90 percent of what’s pumped is toxic water that needs to be removed and treated, making operations more expensive.

Many economic alternatives have been studied, such as carbon offset projects and developing markets for local products like nuts.

But oil is one of the most profitable industries in the world. To compete, government policy and global collaboration are needed, researchers say.

One idea gaining traction involves “debt for nature” deals. Ecuador is considering a big one in coming months, getting banks to renegotiate a sizable portion of its debt in exchange for investing in a new marine reserve off the Galápagos Islands.

Another country may try its own version of the Yasuní proposal. Seychelles, an Indian Ocean island nation under threat from rising sea levels, is sponsoring oil exploration that could be used as leverage when asking wealthy countries to help fund renewable energy projects.

Pressure against oil in Ecuador continues to build. After years of legal hurdles, a ballot measure asking if the government should keep Block 43 crude oil underground may finally go to a vote.

“We will run all the oil blocks down, run all the ecosystems down, but we won’t solve the problem of Ecuador’s economy,” Mr. Iza, the Indigenous leader, said. “We must think of another type of economy.”