This story appears in the January 2014 issue of National Geographic magazine.

It was tempting to think we were going back in time, slipping the bonds of the modern world for tribal life in one of the last great bastions of indigenous culture, chronically jeopardized but still vital, intact, unvanquished. The outsiders who first ventured into the southeast Amazon Basin centuries ago—missionaries, El Dorado seekers, slave traders, jaguar-skin hunters, rubber tappers, wilderness explorers known as sertanistas—traveled by river on laborious boat journeys. We had a single-engine Cessna and good weather on a September morning late in the dry season.

The plane clawed through the haze of forest fires around the Brazilian frontier town of Tucumã. After half an hour heading south and west at a hundred knots, we crossed the twisting course of the muddy Rio Branco, and suddenly there were no more fires, no more roads, no more ragged clear-cut pastures stippled with herds of white cattle, nothing but trackless forest wreathed in mist. Below us lay Kayapo Indian country, five officially demarcated tracts of contiguous land that in sum make up an area about the size of Kentucky. The reserve, which is among the largest protected expanses of tropical rain forest in the world, is controlled by 9,000 indigenous people, most of whom can’t read or write and who still follow a largely subsistence way of life in 44 villages linked only by rivers and all-but-invisible trails. Our National Geographic crew was headed to one of the most remote, the village of Kendjam, which means “standing stone” and which took its name from a dark gray mountain that now appeared before us, arcing some 800 feet above the green canopy like a breaching whale. A little past the mountain lay the glittering braids of the Iriri River, the largest tributary of the Xingu, itself a major tributary of the Amazon. The Cessna swerved down on a dirt airstrip slashed through the forest between the rock and the river and taxied past small garden plots and thatch houses arranged in a circle around a sandy plaza.

When we got out, a dozen or so kids wearing only shorts or nothing at all swarmed around, crouching in the shade of the wings. If you caught their eye, they giggled, glanced away, then peeked to see if you were still looking. The ears of the youngest among them were pierced with conical wooden plugs as thick as a Magic Marker. Kayapo pierce their infants’ earlobes as a way of symbolically expanding a baby’s capacity to understand language and the social dimension of existence; their phrase for “stupid” is ama kre ket, or “no ear hole.”

The kids watched closely as we unloaded our gear, including some gifts for our hosts: fishhooks, tobacco, 22 pounds of high-quality beads made in the Czech Republic.

Barbara Zimmerman, the director of the Kayapo Project for the International Conservation Fund of Canada and the United States–based Environmental Defense Fund, introduced us to the village chief, Pukatire, a middle-aged man wearing glasses, shorts, and flip-flops. “Akatemai,” he said, shaking hands, and adding the bit of English he’d picked up on a trip to North America: “Hello! How are you?”

Kendjam looks timeless, but it was established only in 1998, when Chief Pukatire and his followers split off from the village of Pukanu, farther up the Iriri River, after a dispute about logging. “Fissioning,” as anthropologists call it, is often the way Kayapo resolve disagreements or relieve the strain on resources in a particular area. The village’s population is now 187, and for all its classic appearance there are additions that would have boggled the minds of Pukatire’s ancestors: a generator in a government-built nurses’ station; a solar panel array enclosed in a barbed wire fence; satellite dishes mounted on truncated palm trees. A few families have TVs in their thatch houses and enjoy watching videos of their own ceremonies, along with Brazilian soap operas. Pukatire showed us to a two-room schoolhouse built a few years ago by the Brazilian government—a pistachio-colored concrete structure with a tile roof and shutters and the luxe marvel of a flush toilet fed by well water. We pitched our tents on the veranda.

The heat of the day began to build, and a drowsy peace settled over the village, broken now and then by squabbling dogs and operatic roosters rehearsing for tomorrow’s sunrise. The ngobe, or men’s house, was deserted. At the edge of the central plaza, or kapôt, women sat in the shade of mango and palm trees, shelling nuts and cooking fish wrapped in leaves and buried in coals. Some headed out to the charred earth of their swidden gardens to tend crops of manioc, bananas, and sweet potatoes. A tortoise hunter returned from the forest, loudly singing in the Kayapo custom to announce his successful quest for the land turtles that are a vital part of the village diet. Toward evening the heat ebbed. A group of young warriors skirmished over a soccer ball. About 20 women with loops of colored beads around their necks and babies on their hips gathered in the kapôt and began to march around in step, chanting songs. Boys with slingshots fired rocks at lapwings and swallows; one stunned a white-throated kingbird and clutched it in his hand—the yellow-breasted bird glaring defiantly like the peasant unafraid of the firing squad in the famous Goya painting. Families filtered down to the Iriri for their regular evening baths, but there were caimans in the river, and they did not linger as darkness fell. Eight degrees south of the Equator, the blood orange sun sank quickly. Howler monkeys roared over the dial-tone drone of the cicadas, and earthy odors eddied onto the night air.

At first glance, Kendjam seems a kind of Eden. And perhaps it is. But that’s hardly to say the history of the Kayapo people is a pastoral idyll exempt from the persecution and disease that have ravaged nearly every indigenous tribe in North and South America. In 1900, 11 years after the founding of the Brazilian Republic, the Kayapo population was about 4,000. As miners, loggers, rubber tappers, and ranchers poured into the Brazilian frontier, missionary organizations and government agencies launched efforts to “pacify” aboriginal tribes, wooing them with trade goods such as cloth, metal pots, machetes, and axes. Contact often had the unintended effect of introducing measles and other diseases to people who had no natural immunity. By the late 1970s, following the construction of the Trans-Amazon Highway, the population had dwindled to about 1,300.

But if they were battered, they were never broken. In the 1980s and ’90s the Kayapo rallied, led by a legendary generation of chiefs who harnessed their warrior culture to achieve their political goals. Leaders like Ropni and Mekaron-Ti organized protests with military precision, began to apply pressure, and, as I learned from Zimmerman, who has been working with the Kayapo for more than 20 years, would even kill people caught trespassing on their land. Kayapo war parties evicted illegal ranchers and gold miners, sometimes offering them the choice of leaving Indian land in two hours or being killed on the spot. Warriors took control of strategic river crossings and patrolled borders; they seized hostages; they sent captured trespassers back to town without their clothes.

In their struggle for autonomy and control over their land, the chiefs of that era learned Portuguese and were able to enlist the help of conservation organizations and celebrities such as the rock star Sting, who traveled with Chief Ropni (also known as Raoni). In 1988 the Kayapo helped get indigenous rights written into the new Brazilian Constitution, and eventually they secured legal recognition of their territory. In 1989 they protested the construction of the Kararaô Dam project on the Xingu River, which would have flooded parts of their land. The original plan calling for six dams in the basin was dropped after large demonstrations in which conservation groups joined the Kayapo for what is known today as the Altamira Gathering. “At the 1989 rally at Altamira, Kayapo leaders made a brilliant translation of the Kayapo warrior tradition to the tradition of the 20th-century media spectacle,” says anthropologist Stephan Schwartzman of the Environmental Defense Fund. “They changed the terms of the discussion.”

The Kayapo population is now rapidly growing. From shotguns and motorized aluminum boats to Facebook pages, they have shown a canny ability to adopt technologies and practices of the cash-based society at their borders without compromising the essence of their culture. With the help of noted anthropologist and Kayapo expert Terence Turner of Cornell University, they have embraced video cameras to record their ceremonies and dances and to log interactions with government officials. One small example of their ability to incorporate elements of the outside world into their culture is a pattern now fashionable with Kayapo bead workers: It is based on the logo of the Bank of Brazil. Much to the dismay of some conservationists, several village chiefs formed partnerships with gold mining companies in the 1980s and in the 1990s sold mahogany logging concessions—alliances they came to regret and now have largely ended.

Mostly the Kayapo learned to organize and to put aside their sometimes fractious relations to cultivate unity of purpose among themselves. As a result, they are perhaps the richest and most powerful of around 240 indigenous tribes remaining in Brazil. Their ceremonies, their kinship systems, their Gê language, and their knowledge of the forest and conception of the continuum between humans and the natural world are intact. What may be the most crucial of all, they have their land. “The Kayapo aren’t entering the 21st century as a defeated people. They aren’t degrading themselves,” Zimmerman told me. “They haven’t lost a sense of who they are.”

At least for the moment. It’s one thing to teach the skills and ceremonies of traditional culture; it’s another to inspire a sense of why knowledge of how to make arrow-tip poison (from herbs and snake venom with beeswax as an adhesive) or stack tortoises or stun fish using oxygen-depriving timbo vines might be valuable to a generation beguiled by iPhones and the convenience of store-bought food. Interest in traditional dress, beadwork, and ancestral practices is still strong in Kendjam, but it’s not uniform, and even if it were, the threats from outside are daunting.

“The Brazilian government is trying to pass laws saying indigenous people don’t need to be consulted for their rivers to be used for electricity or mining or even if the boundaries of their lands need to be redrawn,” said Adriano “Pingo” Jerozolimski, the director of a nonprofit Kayapo organization that represents about 22 Kayapo villages. Last June in the village of Kokraimoro, 400 Kayapo chiefs avowed their opposition to a raft of decrees, ordinances, and proposed laws and constitutional amendments that would gut their ability to control their land and prevent them, and any other indigenous group, from adding to their territory. The measures, which echo the dismal history of betrayal and dispossession in North America, are widely seen as part of a campaign to enable mining, logging, and agricultural interests to circumvent indigenous rights, now inconveniently guaranteed by the Brazilian Constitution. Among the many facets of this political struggle, perhaps the most wrenching at the moment is the effort to stop a project the Kayapo thought they had scotched more than two decades ago. The Kararaô project is back under a new name: the Belo Monte hydroelectric complex.

On our second day in Kendjam we went down the Iriri River with two Kayapo marksmen: Okêt, a 25-year-old with three daughters and four sons; and Meikâre, a 38-year-old with two boys and five girls. (In Kayapo villages the division of labor falls along traditional lines. The men hunt and fish; the women cook, garden, and gather fruits and nuts.) Meikâre wore yellow-green beaded armbands and a long blue feather tied to a headband. We pulled away on two aluminum skiffs powered by Rabeta motors that enable shallow-water travel during the dry season. In places the river was black and still as a midnight mirror; in others it looked like tea flowing over the brown Brazilian shield rock, purling through gentle rapids or weaving among gardens of granitic Precambrian boulders.

When we reached a wide, bay-like stretch, Okêt steered for an open area on the west side of the Iriri and cut the engine. We clambered ashore. Okêt and Meikâre slipped into the forest gracefully; Meikâre had a bow and arrows over his shoulders, Okêt a shotgun. After five minutes of ducking and twisting and wriggling past a riot of thorny ferns and fallen limbs, stopping constantly to unhook myself from vines and to disabuse my adrenal glands of the conviction that venomous pit vipers lurked under every pile of leaves, I had no idea which way was east or west, no sense of where the river was, no hope of getting back to the boat on my own.

We picked up a faint game trail. Meikâre pointed to the scat of a collared peccary, a small wild swine, and then just off the trail, a trampled area where the peccary had slept. It was as obvious to Meikâre as the meat department of a Stop & Shop would be to me. He and Okêt darted ahead. Fifteen minutes later a shot rang out, then two more.

When I caught up, a collared peccary lay dead on a bed of leaves. Meikâre fashioned some twine from a swatch of bark and bound the animal’s feet. He cut another belt-shaped length of bark and lashed it to the fore and hind legs. He slung the load over his shoulder, moving with 30 pounds of peccary on his back as if it were no heavier than a cashmere shawl.

The Kayapo we’d left behind had been busy fishing. First they had plugged the escape holes of a mole cricket nest in a sandbank and then had dug up and captured a batch of mole crickets, which they used to bait fishhooks and catch piranha. They chopped up the piranha on a mahogany canoe paddle and used the pieces as bait to catch peacock bass and piabanha. They started a tidy wood fire on the riverbank with Bic lighters and cooked the lunch on freshly whittled skewers.

In midafternoon we motored on toward Kendjam against the light current. Meikâre reclined in the bow, back propped against a mahogany paddle, feet up, hands laced behind his head, gazing out at the hypnotic water like a commuter heading home on the train after a long day.

That night Chief Pukatire wandered over to our camp with a flashlight. “The only things we need from the white culture are flip-flops, flashlights, and glasses,” he said amiably. I wondered if he’d heard how skillfully I’d negotiated the forest that afternoon, because he said he had a new name for me: “Rop-krore,” the Kayapo word for spotted jaguar. He had a good humor about him; you never would have guessed that two of his children had died of malaria not long after the founding of Kendjam.

The village census lists the year of Pukatire’s birth as 1953, and notes the names of his wife, their 38-year-old daughter, and their three grandchildren. He said he was born near the town of Novo Progresso, west of Kendjam, in the time before contact. When Pukatire’s village was attacked by Kayapo from the village of Baú, his mother and his baby sister were killed; Pukatire and his brother were taken away and raised in Baú. Pukatire was around 6 or 7 at the time, he said, and it was not until he was 12 or 13 that he was reunited with his father. “We were happy. We cried,” he said.

Pukatire learned some Portuguese from missionaries and was recruited to help with the program of pacification by the Indian Protection Service, a forerunner of the National Indian Foundation, or FUNAI, the government agency that today represents the interests of Brazil’s aboriginal people. “Before contact we were clubbing each other to death, and everybody lived in fear,” he said. “Without a doubt things are much better today because people aren’t hitting each other over the head with war clubs.”

But Pukatire sounded a lament I heard over and over: “I am worried about our young people who are imitating whites, cutting their hair and wearing stupid little earrings like you see in town. None of the young people know how to make poison for arrows. In Brasília the Kayapo are always told they are going to lose their culture and they might as well get it over with. The elders have to speak up and say to our young people, ‘You can’t use the white man’s stuff. Let the white people have their culture, we have ours.’ If we start copying white people too much, they won’t be afraid of us, and they will come and take everything we have. But as long as we maintain our traditions, we will be different, and as long as we are different, they will be a little afraid of us.”

It was late; Pukatire got up and said good night. Tomorrow would be a big day. The Kayapo leader Mekaron-Ti and the great Ropni, who’d traveled the world in defense of the forest decades ago, were coming to Kendjam to resume the battle against the dam that wouldn’t die.

After four decades of plans dating back to Brazil’s military dictatorship, four decades of studies, protests, revised plans, court rulings, court reversals, blockades, international appeals, a film by Avatar director James Cameron, and lawsuits, construction finally began in 2011 on the $14 billion Belo Monte. The complex of canals, reservoirs, dikes, and two dams is located some 300 miles north of Kendjam on the Xingu, where the river makes a giant U-turn called the Volta Grande. The project, which will have a maximum generating capacity of 11,233 megawatts and is slated to come on line in 2015, has divided the country. Its supporters defend it as a way of delivering needed electricity, while environmentalists have condemned it as a social, environmental, and financial disaster.

In 2005 the Brazilian Congress voted to revive the dam on the grounds that its energy was essential to the security of the rapidly growing nation. The Kayapo and other tribes affected by the plans reassembled in Altamira in 2008. A project engineer from Eletrobras, the state-owned power company, was mobbed and suffered a “deep, bloody gash on his shoulder,” according to news accounts at the time. Claiming that the project’s environmental impact statements were defective and that the region’s indigenous people were not adequately consulted, Brazil’s federal Public Prosecutor’s Office filed a series of lawsuits to stop the complex, essentially pitting one branch of the government against another. The cases went to the country’s Supreme Court, but judgments have been deferred, and construction of Belo Monte has been allowed to proceed.

Even a complex consisting of just two dams will have an enormous impact on the Xingu Basin, thanks to roads and the influx of an estimated 100,000 workers and migrants. The dams will flood an area the size of Chicago. Official estimates project that 20,000 people will be displaced; independent estimates suggest the number may be twice as high. The dams will generate methane from inundated vegetation in quantities that rival the greenhouse gas emissions of coal-fired power plants. The diversion of some 80 percent of the water along a 62-mile stretch of the Xingu will dry up areas that depend on seasonal floodwaters and are home to endangered species.

“The key now is what comes after this,” says Schwartzman. “The government has said only the Belo Monte project will be built, but the original proposal was for five other dams, and there are questions whether Belo Monte alone will be cost-effective or whether the government will come back later and say we need to build these other dams.”

The morning of the great chiefs’ arrival in Kendjam, two dozen Kayapo women, bare-breasted in black underwear and ropes of colored beads, went through what seemed like a dress rehearsal, chanting and marching around the kapôt. Around 4 p.m. the sound of a plane drew a crowd to the airstrip.

Ropni and Mekaron-Ti disembarked with a third chief from the south named Yte-i. Ropni is one of five elder Kayapo who still wear the lip disk—a mahogany puck the size of a small pancake that extends the lower lip. He carried a wooden war club, shaped like a medieval sword. As he stood by the plane, a woman approached, held his hand, and began to sob. In a different culture bodyguards might have hustled her away, but Ropni seemed unfazed and in fact began sobbing as well. The anguished weeping was not the result of some fresh catastrophe but a form of ritual Kayapo mourning for departed mutual friends.

That evening in the men’s house, Ropni addressed the Kendjam villagers, vaulting across octaves with the glissading intonation of Kayapo speech. He stabbed the air with his hands and thumped his club: “I don’t like Kayapo imitating white culture. I don’t like gold miners. I don’t like loggers. I don’t like the dam!”

One of his purposes in coming to Kendjam was to find out why the chiefs of the eastern part of the territory had been accepting money from Eletrobras. Boxes of brand-new 25-horsepower boat motors were stacked on the porch of the Protected Forest Association headquarters. Ropni’s village and other villages in the south had steadfastly refused money from Eletrobras, money that activists said was an attempt to dampen indigenous opposition to Belo Monte. The consortium building the dam was investing in wells, clinics, and roads in the area and was paying a dozen villages nearby an allowance of 30,000 reais a month (roughly $15,000) for food and supplies, which Schwartzman describes as “hush money.”

The first Kayapo encounters with the grimy Brazilian banknotes led to the coining of their evocative word for money: pe-o caprin, or “sad leaves.” More and more sad leaves were a part of Kayapo life, especially in villages close to towns on the Brazilian frontier. In the Kayapo village of Turedjam, near Tucumã, pollution from clear-cutting and cattle ranching had wrecked the fishing grounds, and it was not uncommon to see Kayapo shopping in supermarkets for soap and frozen chicken.

For three nights Pukatire led Ropni and Mekaron-Ti and Yte-i to our camp, where they would sit on the schoolhouse veranda, lighting their pipes and drinking coffee and telling stories while vampire bats veered through the wan aura of a fluorescent bulb. “In the old days men were men,” Ropni said. “They were raised to be warriors; they weren’t afraid to die. They weren’t afraid to back up their words with action. They met guns with bows and arrows. A lot of Indians died, but a lot of whites died too. That’s what formed me: the warrior tradition. I have never been afraid to say what I believed. I have never felt humiliated in front of the whites. They need to respect us, but we need to respect them too. I still think that warrior tradition survives. The Kayapo will fight again if threatened, but I have counseled my people not to go looking for fights.”

He barked for more coffee, and then, seemingly agitated, took his cup to the edge of the veranda, away from the circle of schoolhouse chairs. For a long while, he stared into the darkness.

On the day the chiefs left, there were letters they needed to sign—FUNAI paperwork authorizing various matters they had discussed. Mekaron-Ti, who was fluent in the Western world as well as the forest world, signed his name quickly like someone who had written a thousand letters. But Ropni held the pen awkwardly. It was striking to see him struggle with the letters of his name, knowing what esoteric expertise was otherwise in his hands, how deftly he could fasten a palm nut belt, or insert a lip plate, or whittle a stingray tail into an arrowhead, or underscore the oratory that had helped secure a future for his people. In the Xingu Valley there had hardly ever been a more able pair of hands. But in the realm that required penmanship, the great chief was like a child.

Six months later, 26 eastern Kayapo leaders met in Tucumã and signed a letter rejecting further money from the dambuilding consortium: “We, the Mebengôkre Kayapo people, have decided that we do not want a single penny of your dirty money. We do not accept Belo Monte or any other dam on the Xingu. Our river does not have a price, our fish that we eat does not have a price, and the happiness of our grandchildren does not have a price. We will never stop fighting... The Xingu is our home and you are not welcome here.”

Somehow word had gotten out. The paleface with no holes in his ears was heading up Kendjam Mountain. It was 2:30 in the afternoon, and before our hiking group was halfway down the airstrip, we’d picked up a tail of kids, 15 or so, a cluster of teen and preteen girls and boys with painted faces carrying water in old soda bottles, and even one ebullient little fellow who couldn’t have been more than four: barefoot and unsupervised with no parent hovering about to make sure he didn’t get lost or eaten by a jaguar or poisoned by a pit viper or pierced by the thorns and spines on every other plant.

He was wearing just a pair of shorts—in contrast to me, in boots, hat, shirt, long pants, sunglasses, SPF three million sunblock, and three bandannas to mop up biblical torrents of sweat. We walked single file for a while, and then the kids rushed past, swarming around some tall shrubs; they pulled the branches down and chopped off seedpods of the wild inga fruit.

After 45 minutes the trail began to rise. The gray stone of the mountain loomed above: vertical walls, no fissures or obvious cracks. North, south, and west, its sides were seemingly unclimbable, but the eastern end sloped into the forest. The teenagers laughed and chattered up the steep grade, vaulting logs and swinging on vines. A narrow trail zigzagged up the side and cut through a cleft where you had to haul yourself with sweaty hands over a large boulder.

A long ramp led up to the summit dome. All the kids were sitting on the summit, backlit by a milky blue sky. I wheezed up after them. Brown-gray lizards scuttled around. The children scuttled around too, fearlessly flirting with the void where the rock fell precipitously for five or six hundred feet, maybe more. No handrails. No liability advisories. No adult supervision. The four-year-old boy capered at the edge of the abyss, laughing and exulting as if it was the most marvelous day of the year.

When we all started down, he ran on ahead, and I found myself thinking about the night after the big chiefs had gone, when one of our guides, Djyti, came to visit, and we asked him a crucial question. “Can you be a Kayapo and not live in the forest?” Djyti thought for a while, then shook his head and said no. Then, as if contemplating something unthinkable, he added: “You are still a Kayapo, but you don’t have your culture.”

In the past some anthropologists have fetishized cultural purity, fretting over the introduction of modern technology. But cultures evolve opportunistically like species—the Plains Indians of North America picked up their iconic horses from the Spanish—and strong traditional cultures will privilege themselves, making the accommodations they think will ensure their futures. We can question whether a man dressed in a parrot feather headdress and penis sheath is more valuable than one in a Batman T-shirt and gym shorts. But who can be blind to their knowledge of forest plants and animals or to the preeminent values of clean water, untainted air, and the genetic and cultural treasure of diversity itself?

It is one of the richest ironies of the Amazon that the supposedly civilized outsiders who spent five centuries evangelizing, exploiting, and exterminating aboriginal people are now turning to those first inhabitants to save ecosystems recognized as critical to the health of the planet—to defend essential tracts of undeveloped land from the developed world’s insatiable appetites.