Yerupajá mountain in the Peruvian Andes. Thom95/Wikimedia

It is not hard to imagine the effect that dark, sprawling underground workings can have on superstitious miners. And in the heart of the Andes mountain range – which stretches over several South American countries – a piece of folklore has been passed down from generation to generation, taking on a life of its own. The mysterious Muki, a small, elf-like creature dressed in mining gear, is said to roam the caves and tunnels of underground mines in the region.

Legends of the Muki have been consistently shared over the years in isolated mining camps as far north as Colombia, as far south as Bolivia, and in the Peruvian Andes in between. However, its name differs from region to region – people in the Moquegua region in the south of Peru speak of a chinchiliku, and those in the northern Cajamarca region call it the jusshi. The word muki originates from the Quechuan language of the indigenous ethnic groups in South America.

According to oral tradition, the Muki is no more than two feet in height, yet is disproportionately muscular, with a deep voice. His skin is described as ghostly pale, with long blond hair framing dazzling eyes that reflect the light, like the metals in the mines he inhabits. The Muki dresses in traditional mining garb, which varies from era to era: according to legend, he used to roam the darkness wearing a poncho and carrying a lantern, but nowadays he prefers modern mining clothes with boots and a flashlight. His feet are said to be abnormally large, resulting in a strange, duck-like waddle.

Related: Cornish miners brought their mining expertise and their reverence for the Tommyknockers with them when they immigrated to the American West

While the description and belief in the Muki is consistent with Andean folklore regarding creatures and demons from the underworld, the exact nature and motivation of the mysterious mine-dweller is less certain, as are the origins of the legend. Most agree the Muki is a solitary creature. And while some legends paint him as something of a predatory goblin searching for unsuspecting children or isolated miners to attack, in general the existence of the Muki has become a sort of catch-all for the mysterious goings-on underground. Mining equipment disappeared? Blame the Muki. Strange noises or movement in the dark? It is probably the Muki. Some stories paint the creature in a more positive light, as a mysterious but helpful figure who can lead miners to productive ore deposits or warn them of dangers underground.

One common theme in Muki lore is the tendency for the creature to make deals with miners. The Muki is said to trade valuable mining knowledge or help in exchange for luxuries such as alcohol or coca. However, the Muki plays the part of a trickster or demon, and these deals can backfire badly for miners who are greedy and indiscreet about their luck. One such story involves two Peruvian miners, Demetrio and Anastacio. Demetrio, a poor, hard-working miner, notices his coca leaves mysteriously disappearing, and one day decides to hide and wait for the thief. The thief, of course, is the Muki, a terrifying discovery for Demetrio. But the Muki promises to help Demetrio with his work in exchange for more coca, provided he tell no one about the deal. Demetrio gladly accepts, and immediately his rusted equipment is restored to a gleaming condition. Over the next weeks, Demetrio begins to get richer and richer, as does his companion Anastacio, who brags to Demetrio that he has met the Muki. Demetrio, remembering his deal, says nothing and continues to work hard, using his newfound wealth to help his family and purchase a new house. On the other hand, Anastacio and other miners who also met the Muki do the opposite, loudly bragging about their luck and spending their money foolishly on luxuries. After a few weeks, Demetrio again runs into the Muki, who sternly warns him to leave the mine and never return. Demetrio heeds the advice and shortly afterwards a sudden tunnel collapse kills Anastacio and his greedy friends.

The most plausible – and unfortunate – explanation for the rise and spread of Muki legends involve the creature as a personification of the dangers and risks miners accept in their line of work. The word muki comes from the Quechua word murik, which means “to smother” or “to strangle,” a reference to the often lethal dust and silica that would fill miners’ lungs. In this explanation, the stories of bargains and deals passed down from miner to miner represent the risks that came with trying to make a living from the often dangerous work. It was truly a devil’s bargain for some, as the harder they worked to escape poverty, the more dangerous dust they inhaled.