Correction: A previous version of this article incorrectly stated that the emperor Atahualpa did not produce a roomful of gold at Pizarro's request when Pizarro conquered Cajamarca in 1532. In fact, Atahualpa did produce the gold but was executed anyway. This version has been updated.

Gold. The Aztecs killed for it. The Inca enslaved whole populations for it. Spain sent legions of marauding conquistadors up and down the Americas in a hallucinatory hunt, believing that gold was so abundant that chieftains rolled in it, washing away the glittering residue in their daily morning swims.

Down the centuries, the quest for El Dorado has held the South American continent in thrall, luring generations of fortune hunters to its far reaches, from 1st-century warlords to 21st-century adventurers. The earth beneath them has not disappointed. The geologic exuberance known as the Cordillera of the Andes has yielded a fount of treasure: the emeralds of Boyaca, the silver of Potosi, the gold of Cajamarca.

Indeed, when Pizarro conquered Cajamarca in 1532, he demanded a roomful of gold from the emperor Atahualpa; when it was produced, he chopped off the Inca’s head and established a new kind of Golden Rule. So it was that a mineral became king and a craze began.

Nowhere has Peru’s frenzy for gold been so fevered as in the mountains that surround Lake Titicaca. And nowhere has that fever been so intemperate as in a town tucked into a glacial aerie: La Rinconada, the highest human habitation in the world.

It is a destination for only the most valiant. Clinging to the peak of Mount Ananea, with a cowl of glacier overhead, La Rinconada boasts few tourists, no hotel, no sights to speak of, apart from the endless snow, a dome of blue sky and a swarm of hard-bitten inhabitants. For the 50,000 souls who brave the subzero cold to pick rock on those hoary heights, there is no sewage system, no water, no paved roads, no sanitation whatsoever. It is a wilderness of ice, rock and gold, perched more than 18,000 feet up in the Peruvian Andes.

Beside the gawping mine shafts that scar the mountain’s face are huts of tin, built at capricious and precarious angles, with nothing to keep out the glacial wind but improvised sheets of metal; nothing to generate warmth but fetid heaps of garbage. The only convenience here is the electricity, brought in by overlords so that the machinery can grind and shuttle-cars can rumble through the mountain’s black veins. At night, La Rinconada glitters like a cruel oasis.

Make no mistake: This is a trip for the armchair only. As Dante might say, let me guide you through a fascinating circle of hell.

To a barren world

I would not have gone up to the peak the locals call “la Bella Durmiente”— Sleeping Beauty — had I not been accompanied by a team of professionals from CARE. I traveled there to write a script for “Girl Rising,” a film directed by Richard Robbins, produced by the Documentary Group and poised for release next week.

It is a film about girls who live in desperately hard places, about how educating them could change their families, their communities and very possibly the world. In the course of my journey up to La Rinconada, I had every expectation that I would find hunger and hardship. What I had not expected was to find beauty in ugliness — to see, as a mountain shaman might put it, the sacred in the profane.

Being a native of Lima, I knew what every schoolchild knows, that although Peru is small (slightly smaller than Alaska), it encompasses a virtual panoply of landforms: mountain, jungle, desert, marshland, archipelago, coastline — all in defined geographic areas, and often in dramatic contiguity. Fly over Peru, and Mount Huascaran’s majestic peak seems to hover over the foliage of the Amazon jungle; the green cliffs of Miraflores are just down the coast from the sands of Chan Chan.

But riding a truck from Puno to the little village of Putina — circling the northernmost bend of Lake Titicaca — I almost convinced myself that this trip would continue its happy, paved course into the horizon. The roads were good, the views of the so-called “highest navigable lake in the world” literally breathtaking, and at almost 13,000 feet, there was no malaise that a few cups of coca tea couldn’t cure.

In fact, this part of the world is known for its pharmacological cornucopia. Every shrub or weed is a botanical miracle: flores de Bach for melancholy, muña for chills or bone pain, pampanis for intestinal gas, yahuar chonca for diarrhea. Fields of medicinal possibility rushed past as we raced along the highway. Looking out at the reed catamarans that skimmed the lake’s dazzling surface or the grass islands that floated peacefully in the sun, I couldn’t imagine that snows trickling into that paradise were anything but pristine.

Within a half-hour of leaving Putina, however, the road had become dirt, rock, soon frozen mud, and my crew was being pitched about, as it would be for two more hours of a difficult journey. The Altiplano, a stretch of high mesa only slightly lower than the Tibetan plateau, stretched before us, stippled with rough grass and stone. Trees were scarce, thatched huts more so, and the odd flowers — bright orange cantutas — had brought a herd of startled alpaca onto that frigid January plain. They stood at the limits of faded pasture, raising their delicate heads as we bounced over rut and rock, eyeing us with haughty scorn.

Before long, as broad swaths of arid plain gave way to scarred earth, we could see why La Rinconada is only rarely visited by government poobahs. The air at 18,000 feet is stiflingly thin, the cold excruciating. Now and then, ramshackle trucks and vans rattled past, carrying miners and their families, stopping on the roadside to catch their breath, chew coca leaf and leave offerings to the earth goddess, Pachamama, to whom altars had been erected along the way. All about, for as far as the eye could see, was a crazed landscape. What was once a region of sparkling lakes, leaping fish and grassland is now a barren world that beggars the imagination.

The green is gone. The earth is turned. What you see as Mount Ananea looms into view is a lunar landscape, pitted with orange lakes that reek of cyanide. The birds that once flew over La Rinconada are nowhere to be seen; none flap overhead, save an occasional vulture. The odor is staggering; it is the putrid stench of chemicals, of rot, of human excrement. Even a whipping wind cannot sweep away the stink.

As you ascend toward the great white cap of Sleeping Beauty, all you see is garbage, a choking ruin, and ghostly shadows picking through it. Gigantic trucks shove at the earth. Whole families wade out into the toxic pools, fishing for gold. Along the perilously winding road that climbs to the summit, flocks of women in wide skirts scramble up cliffs, carrying heavy bags of ore, hoping to pound a fleck of gold from the waste that has spilled from the mine shafts; children stagger beside them, shouldering burdens of their own.

With so much poverty about, it is hard to believe that Sleeping Beauty harbors riches, that gold ripped from her entrails will glitter on Cartier and Tiffany counters around the world. But history books tell us that Mount Ananea has been offering up gold since the days of the Inca. According to travelers’ journals, a block the size of a horse’s head and weighing more than 100 pounds was pulled free in the 1500s and sent to the Spanish king. The region’s rivers were said to be strewn with glittering nuggets.

El Inca Garcilaso de la Vega, a half-Indian, half-Spanish chronicler who lived in the 16th century, wrote that this tract of Peru contained gold beyond imagining. Chunks of shiny rock as large as a human head — and 24-karat pure — had rolled from the damp black stone.

Although the king’s mines collapsed in the 1700s under the weight of the glacier and were abandoned for 200 years, interest in Ananea was rekindled in the 1960s, when teams of European and Japanese mountaineers scaled the stretch known as the Cordillera Real. Hordes of village boys followed, building huts, bringing families. With little more than small picks and big dreams, some defied the odds and struck gold. Today, there are just enough stories of random fortune to keep their children here.

A bench of gold

Peru is booming these days. Its restaurants are full; its cuisine has become all the rage. Cusco and Machu Picchu are world-class destinations. Peru’s economy boasts one of the highest growth rates in the world. In the past six years, its annual growth has hovered between 6 and 9 percent, rivaling the colossal engines of China and India.

Peru is one of the world’s leading producers of silver and one of Latin America’s most exuberant founts of precious metals. It is an energetic producer of natural gas. It is one of the top five harvesters of fish on the planet. Its premier fashion photographer is the darling of Vogue. Walk Lima’s streets and you can’t fail to see the evidence of progress: Here is a country alive with investment and tourism, a hive of construction, home to a rising and robust middle class.

But it is gold that has brought multinational companies to the highlands of Puno, many of them installing sturdy, viable operations that promise to lift rural communities out of poverty. Peru is hoping that Atahualpa’s curse is dead; that gold will be its salvation; that the country will no longer be — as the old saying has it — a beggar sitting on a bench of gold.

All the same, the wheels of progress that have sped Peru toward economic success and a burgeoning middle class have yet to climb the pestilential road to La Rinconada. There, in the shadow of Sleeping Beauty, every miner is on his own, and every woman and child who accompanies him a hostage to fickle fortune.

Gold no longer rolls from the mountain in chunks the size of a man’s head (if indeed it ever did). But the present generation of miners has found that a manic pounding of rock can produce miracles. In 2011, 150 tons of gold were harvested in Peru, worth $6.8 billion. In order to produce it, almost 5 million tons of Peruvian rock were knocked free and ground down. Look at it this way: For every gold ring you see on a finger, miners have had to turn 250 tons of rock.

In La Rinconada, the ore that harbors those precious flecks is washed in ponds of cyanide, pounded with mercury in giant mortars of stone and burned clean in ovens that send mercury fumes coiling up onto the glacier’s snows. The work outdoors is often done by women and children. The work in the damp, freezing shafts is done by men. At the end of the process, a miner working under the cachorreo system — a man who labors for 30 days and gets paid on the 31st day in the form of whatever rock he can carry — may walk away with a nugget worth $40. His neighbor, on the other hand, may be rich beyond his imagining.

One thing is sure: Every year, less and less is harvested from Sleeping Beauty. There is only so much gold on this planet. For all the masks of Tutankhamun, for all the headdresses of the Lord of Sipan, for all the bling and glitter of Fifth Avenue, the total amount of gold that humans have been able to pull from rock is a mere 170,000 metric tons, barely enough to fill two Olympic swimming pools. More than half of it has been mined in the last 50 years.

Some of this, mind you, has been done responsibly. But as earth is heaved and ore carved from the unruly cliffs of Ananea, the glacier and nearby lakes have sent toxic injections to the sparkling waters of Lake Titicaca.

A sudden awe

Wandering the ice-mud streets of La Rinconada, with its drunks and fetor and HIV-infected sexual slaves, one can’t help but hope that this gold town’s days are numbered. The population that lives below — that has inhabited the shores of Lake Titicaca for centuries — made that hope known last year in a protest against all mining operations that didn’t take into consideration the health and welfare of the locals. The Aymara, who are gentle by nature, were particularly vociferous on the subject, storming through Puno last May and unleashing their fury on everything in their way. The Peruvian military responded in kind.

The trickle-down of an economic boom can be surprising.

Even so, with all the antipathy a traveler might summon for a place so willfully despoiled, I found myself standing beside the road a good distance from La Rinconada, looking back at that promontory in wonder. With all my senses jangled, with the altitude making my every step as labored as an astronaut’s, I found myself filled with sudden awe.

Like the Ancient Mariner, who stared at the leaden sea and its hideous slime and eventually beheld a rare, soul-lifting beauty, I suddenly saw the tin rooftops gleam like a mantle of diamonds. As the sun moved over the snow, the ravished mountain seemed to ripple with ribbons of color. In that happy trance, I recalled the kindness of a widow who offered me the shelter of her hut and a gourd of hot soup. I remembered the fiery spirit of Senna, a 14-year-old girl who could recite a string of verses by the great poet Vallejo. I heard the laughter of a child in yellow, who danced in a noonday cantina, emptied of drunks and whores.

Even here, on this plundered peak, there are fleeting moments of joy.

Arana is writer at large for The Post and former editor of Book World. Her biography of South American liberator Simon Bolivar will be published in April.