This hot riverside city, its old port redolent of raw fish and rotting fruit, spills out alongside the Amazon River in the midst of the biggest tropical rain forest on earth.

In every direction the trees fan out, hardwoods, softwoods, woods that look like burnished violet, jackfruit trees, papaya trees, rubber trees, Brazil nut trees, trees draped in vines, trees washed in rains, trees slender as aspens and fat as sequoias, trees that entwine in a high leaf canopy so that sunlight and shadow filter down toward the ground.

To say it looks fertile is a little like saying the Atlantic Ocean looks wet.

From the light planes that fly two hours at a stretch over solid deep green treetops, from the boats that motor past thick tangles of shore growth and especially from damp forest paths where you duck under branches and brush insects from your ears, it is difficult to imagine this jungle as anything but a great greenhouse gone amok, a plant and timber wealth so vast that one has only to go at it with a shovel and axe to begin tapping a new frontier.

Amazonia as breadbasket, as lumberyard, as pastureland, as fishery -- that was the dream when Brazilian officials first set out in the 1960s to "occupy" the river basin that covered nearly two-thirds of the nation's land. There were warnings even then, alarms from scientists who saw some of what might happen, but nobody paid much attention to them. Pioneers began moving in. Big companies mined and cleared ranchland. Men set fire to the forest and the smoke shut airports a hundred miles away.

Then the rain forest began to fight back.

Where colonists cleared trees to plant manioc and corn, the third year's crops grew withered and tiny and starving for nutrients.

Where ranchers burned massive jungle plots for their cattle, the new pastures clogged with weeds no cow could eat.

Where rain forest was cleared and replaced with single-species forests, pests and growth problems turned an enormous American pulp and timber farm into an apparent financial disaster.

Where forests were leveled thousands of acres at a time, alarmed scientists raised international fears about what really large-scale deforestation might do -- change the whole region's weather, kill vital species and warm atmospheric temperatures enough to melt the polar icecaps and flood the earth's coastal cities.

Where fishing fleets surged through the rivers to feed the rapidly growing pioneer population, fish life dropped so precipitously that yields today are believed to be half what they were five years ago.

What scientists have been trying for decades to point out is that one of the most delicate, intricate, and poorly understood ecological systems in the world lies inside the facade of abundance that is Amazonia. The rain forest is a system perfectly tuned for its own self-perpetuation, they have said, and to cut, plant and harvest it as though it followed the rules of the northern temperate woods is to beckon disaster.

Fifteen years ago, as the most ambitious Amazonian development program in South American history got underway, Brazilian officials discounted many of those warnings as luxuries of the developed world. Brazil was already suspicious about what it perceived as international designs on the Amazon basin. A famous Hudson Institute study in the 1940s had outraged Brazilians by suggesting that the Amazon River be dammed, turning much of the basin into a huge inland sea. And one of the slogans of the feverish 1960s development was, "If we don't occupy it, the Chinese will."

"For us the time and the hour of Amazonia arrived," wrote the Brazilian Murillo Melo Filho in 1963, ". . . bringing the sounds of trumpets of our coming victory over the so-called, 'green hell.' " But government officials have long since stopped much talk of trumpets and coming victories. The voices in the planning offices are a little more subdued these days.

"Today we think Amazonia is a reserve that must be occupied very cautiously, and with a great deal of care," said an Interior Ministry official.

"We have very modest goals," said a colonization official.

Colonization, which at one point was to bring as many as a million northeastern settlers to the lands along the Trans-Amazon highway, has turned out to be a difficult prospect for poor farmers struggling with the basin's many areas of infertile soils.

"These are some of the oldest soils in the world," said Dale Bandy, a University of North Carolina crop physiologist who runs a tropical soils research project in the jungle town of Yurmaguas, Peru. "They're very arid. They're full of aluminum, and aluminum is very toxic to plant growth. And they're very infertile."

The prospect is not thought to be much brighter for cattle pastures, many of which have been cleared by large-scale burning and bulldozing. Left to the elements, big open areas of cleared rain forest are rapidly taken over by weeds that are inedible -- sometimes poisonous. Erosion washes away what little useful soil there is.

"What is there is structured so delicately that the heavy rains and the compaction from cattle just make it an order of magnitude worse," said Thomas Lovejoy, science vice-president of the Washington-based World Wildlife Fund, who has closely studied the Amazon area since the late 1960s. "And on top of that you have these weedy species . . . it's mostly just a bust."

So colonists and cattlemen alike have had to wrestle with the uncooperative rain forest land, and some -- it is impossible to say with any certainty how many -- have given up and abandoned their plots. But the problem is not simply in the ground. Even timbering, in these millions of acres of growing wood, has thwarted men as a large-scale enterprise.

"The Amazon is essentially a biologist's dream, but a forester's nightmare," Lovejoy said. "Imagine trying to manage a patch of forest of five hectares" -- 12 1/2 acres -- "with 300 species on it."

Millions of years ago, many scientists now believe, the great Amazon lake slowly dried up and left small isolated islands of plant and animal life dotted across its breadth. Species flourished and multiplied, each developing its own adaptation to the particular nutrient patterns of the jungle, and what evolved were thousands of different trees and plants scattered throughout the jungle as though someone had deliberately mixed all the seeds together and flung them to the winds.

An Amazon forester will find no tidy stands of mahogany or teak to cut and haul away. He will find one mahogany tree in this patch, another half a mile away. And since many riverside areas already have been cut, he will have to make his way through miles of nearly impassable roads or jungle paths just to get from tree to tree.

It is not that every human effort to farm Amazonia has collapsed into ecological ruin. Parts of the basin -- Rondonia territory in the south, for example -- have good fertile soil that pioneers have fervently started to plant. Some cattle ranches in the southeast are learning to fertilize and manage their lands. But 15 years and hundreds of millions of dollars of Brazilian official investment have not resolved the essential Amazonia question: How can men make the rain forest produce?

At the Manaus-based National Institute for Amazon Research (INPA), researchers are at work on the problems of harvesting natural rain forest wood and testing its usability in other climates.

"The vocation of the land is forest," said Henrique Bergamin, the director of INPA. "I do believe in it. We can have any kind of forest. Fruit trees -- we have hundreds of species of good fruit tree. We have thousands of species of good wood."

At Yurmaguas, Bandy and his co-workers believe they have learned how to fertilize bad jungle soil at a cost that even small farmers can manage.

"I really believe that the eastern side of the Andes" -- Peru's Amazon territory -- "will within 10 years be the major food-producing area for Peru itself," Bandy said. "These farmers just don't have any concept of what fertilizer and lime is . . . no concept at all of any of these improved technological packages . . . no concept of even trying to select in their own fields -- 'Well, that's a good plant and let's save that for next year.' "

"It's just too damn complicated," countered David Arckoll, an INPA agronomist who cannot accept Bandy's vision of many small farmers producing cash crops. "I don't think you can get this sort of skill passed over to smallholders . . . and it's going to be a long time before they have access to the sort of credit facilities which will allow them to go to this high-input agriculture."

What Arckoll likes to describe for Amazon settlers is "food forests" -- small groves of fruit trees that grow easily, or with fertilizer as simple as human waste, in Amazonian soil. Arckoll has experimented with the starchy breadfruit and peach palm, with plantains and creeping legumes, with fruits whose flavor is astonishing to someone from outside the jungle. The sorva, which looks like a crumpled brown ping-pong ball, has a soft inside that tastes like sweet raisins.

In the meantime, many Amazonia scientists welcome the change in the government's hell-bent development ardor of the late 1960s. The government is readier now to listen to scientific warnings, they say, and to fund research that sometimes advises against the kind of Amazonian development Brazilian officials once prized.

A forest preservation law, now tied up in the high levels of the Brazilian government, would regulate broad-scale Amazonian development; INPA ecologists say it is not perfect, but it is a start. Eighteen million acres of national parks and biological reserves have been marked out.

"Fourteen years ago, when I started working here, you could count on your fingers the people who worried about deforestation," said Maria Teresa Jorge Padua, Brazilian national parks director. "Within 10 years this has turned into a national worry."

From the scientists' perspective, it is about time. "Everybody who deals with timber is looking out to the Amazon," said Bergamin. "Second, you know that food production is the main concern of all governments. And we have 5.5 million square kilometers here of land, supposedly not being used. So the pressure is very high."