In 1940, four teenage boys stumbled, almost literally, from German-occupied France into the Paleolithic age. As the story goes – and there are many versions of it – they had been taking a walk in the woods near the town of Montignac when the dog accompanying them suddenly disappeared. A quick search revealed that their animal companion had fallen into a hole in the ground, so – in the spirit of Tintin, with whom they were probably familiar – the boys made the perilous 15-metre descent to find it. They found the dog and much more, especially on return visits illuminated with paraffin lamps. The hole led to a cave, the walls and ceilings of which were covered with brightly coloured paintings of animals unknown to the 20th-century Dordogne – bison, aurochs and lions. One of the boys later reported that, stunned and elated, they began to dart around the cave like “a band of savages doing a war dance”. Another recalled that the painted animals in the flickering light of the boys’ lamps seemed to be moving. “We were completely crazy,” yet another said, although the build-up of carbon dioxide in a poorly ventilated cave may have had something to do with that.

This was the famous and touristically magnetic Lascaux cave, which eventually had to be closed to visitors lest their exhalations spoil the artwork. Today, almost a century later, we know that Lascaux is part of a global phenomenon, originally referred to as “decorated caves”. They have been found on every continent except Antarctica – at least 350 of them in Europe alone, thanks to the cave-rich Pyrenees – with the most recent discoveries in Borneo (2018) and Croatia (April 2019). Uncannily, given the distances that separate them, all are adorned with similar decorations: handprints or stencils of human hands, abstract designs containing dots and crosshatched lines, and large animals, both carnivores and herbivores, most of them now extinct. Not all of these images appear in each of the decorated caves – some feature only handprints or megafauna. Scholars of paleoarcheology infer that the paintings were made by our distant ancestors, although the caves contain no depictions of humans doing any kind of painting.

There are human-like creatures, though, or what some archeologists cautiously call “humanoids”, referring to the bipedal stick figures that can sometimes be found on the margins of the panels containing animal shapes. The non-human animals are painted with almost supernatural attention to facial and muscular detail, but, no doubt to the disappointment of tourists, the humanoids painted on cave walls have no faces.

This struck me with unexpected force, no doubt because of my own particular historical situation, almost 20,000 years after the creation of the cave art in question. In about 2002 we had entered the age of “selfies,” in which everyone seemed fascinated by their electronic self-portraits – clothed or unclothed, made-up or natural, partying or pensive – and determined to propagate them as widely as possible. Then, in 2016, the US acquired a president of whom the kindest thing that can be said is that he is a narcissist. This is a sloppily defined psychological condition, I admit, but fitting for a man so infatuated with his own image that he decorated the walls of his golf clubs with fake Time magazine covers featuring himself. On top of all this, we have been served an eviction notice from our own planet: the polar regions are turning into meltwater. The residents of the southern hemisphere are pouring northward toward climates more hospitable to crops. In July, the temperature in Paris reached a record-breaking 42.6C.

You could say that my sudden obsession with cave art was a pallid version of the boys’ descent from Nazi-dominated France into the Lascaux cave. Articles in the New York Times urged distressed readers to take refuge in “self-care” measures such as meditation, nature walks and massages, but none of that appealed to me. Instead, I took intermittent breaks from what we presumed to call “the Resistance” by throwing myself down the rabbit hole of paleoarcheological scholarship. In my case, it was not only a matter of escape. I found myself exhilarated by our comparatively ego-free ancestors, who went to great lengths, and depths, to create some of the world’s most breathtaking art – and didn’t even bother to sign their names.

Cave art had a profound effect on its 20th-century viewers, including the young discoverers of Lascaux, at least one of whom camped at the hole leading to the cave over the winter of 1940-41 to protect it from vandals, and perhaps Germans. More illustrious visitors had similar reactions. In 1928, the artist and critic Amédée Ozenfant wrote of the art in the Les Eyzies caves, “Ah, those hands! Those silhouettes of hands, spread out and stencilled on an ochre ground! Go and see them. I promise you the most intense emotion you have ever experienced.” He credited the Paleolithic artists with inspiring modern art, and to a certain degree, they did. Jackson Pollock honoured them by leaving handprints along the top edge of at least two of his paintings. Pablo Picasso reportedly visited the famous Altamira cave before fleeing Spain in 1934, and emerged saying: “Beyond Altamira, all is decadence.”

Of course, cave art also inspired the question raised by all truly arresting art: “What does it mean?” Who was its intended audience, and what were they supposed to derive from it? The boy discoverers of Lascaux took their questions to one of their schoolmasters, who roped in Henri Breuil, a priest familiar enough with all things prehistoric to be known as “the pope of prehistory”. Unsurprisingly, he offered a “magico-religious” interpretation, with the prefix “magico” serving as a slur to distinguish Paleolithic beliefs, whatever they may have been, from the reigning monotheism of the modern world. More practically, he proposed that the painted animals were meant to magically attract the actual animals they represented, the better for humans to hunt and eat them.

Unfortunately for this theory, it turns out that the animals on cave walls were not the kinds that the artists usually dined on. The creators of the Lascaux art, for example, ate reindeer, not the much more formidable herbivores pictured in the cave, which would have been difficult for humans armed with flint-tipped spears to bring down without being trampled. Today, many scholars answer the question of meaning with what amounts to a shrug: “We may never know.”

The Lascaux caves in south-western France. Photograph: Tuul & Bruno Morandi/Getty

If sheer curiosity, of the kind that drove the Lascaux discoverers, isn’t enough to motivate a search for better answers, there is a moral parable reaching out to us from the cave at Lascaux. Shortly after its discovery, the one Jewish boy in the group was apprehended and sent, along with his parents, to a detention centre that served as a stop on the way to Buchenwald. Miraculously, he was rescued by the French Red Cross, emerging from captivity as perhaps the only person on earth who had witnessed both the hellscape of 20-century fascism and the artistic remnants of the Paleolithic age. As we know from the archeological record, the latter was a time of relative peace among humans. No doubt there were homicides and tensions between and within human bands, but it would be at least another 10,000 years before the invention of war as an organised collective activity. The cave art suggests that humans once had better ways to spend their time.

If they were humans; and the worldwide gallery of known cave art offers so few stick figures or bipeds of any kind that we cannot be entirely sure. If the Paleolithic cave painters could create such perfectly naturalistic animals, why not give us a glimpse of the painters themselves? Almost as strange as the absence of human images in caves is the low level of scientific interest in their absence. In his book What Is Paleolithic Art?, the world-class paleoarcheologist Jean Clottes devotes only a couple of pages to the issue, concluding that: “The essential role played by animals evidently explains the small number of representations of human beings. In the Paleolithic world, humans were not at the centre of the stage.” A paper published, oddly enough, by the US Centres for Disease Control and Prevention, expresses puzzlement over the omission of naturalistic depictions of humans, attributing it to Paleolithic people’s “inexplicable fascination with wildlife” (not that there were any non-wild animals around at the time).

The marginality of human figures in cave paintings suggests that, at least from a human point of view, the central drama of the Paleolithic went on between the various megafauna – carnivores and large herbivores. So depleted of megafauna is our own world that it is hard to imagine how thick on the ground large mammals once were. Even the herbivores could be dangerous for humans, if mythology offers any clues: think of the buffalo demon killed by the Hindu goddess Durga, or of the Cretan half-man, half-bull Minotaur, who could only be subdued by confining him to a labyrinth, which was, incidentally, a kind of cave. Just as potentially edible herbivores such as aurochs (giant, now-extinct cattle) could be dangerous, death-dealing carnivores could be inadvertently helpful to humans and their human-like kin, for example, by leaving their half-devoured prey behind for humans to finish off. The Paleolithic landscape offered a lot of large animals to watch, and plenty of reasons to keep a close eye on them. Some could be eaten – after, for example, being corralled into a trap by a band of humans; many others would readily eat humans.

Yet despite the tricky and life-threatening relationship between Paleolithic humans and the megafauna that comprised so much of their environment, 20th-century scholars tended to claim cave art as evidence of an unalloyed triumph for our species. It was a “great spiritual symbol”, one famed art historian, himself an escapee from Nazism, proclaimed, of a time when “man had just emerged from a purely zoological existence, when instead of being dominated by animals, he began to dominate them”. But the stick figures found in caves such as Lascaux and Chauvet do not radiate triumph. By the standards of our own time, they are excessively self-effacing and, compared to the animals portrayed around them, pathetically weak. If these faceless creatures were actually grinning in triumph, we would, of course, have no way of knowing it.

We are left with one tenuous clue as to the cave artists’ sense of their status in the Paleolithic universe. While archeologists tended to solemnise prehistoric art as “magico-religious” or “shamanic,” today’s more secular viewers sometimes detect a vein of sheer silliness. For example, shifting to another time and painting surface, India’s Mesolithic rock art portrays few human stick figures; those that are portrayed have been described by modern viewers as “comical,” “animalised” and “grotesque”. Or consider the famed “birdman” image at Lascaux, in which a stick figure with a long, skinny erection falls backwards at the approach of a bison. As Joseph Campbell described it, operating from within the magico-religious paradigm: “A large bison bull, eviscerated by a spear that has transfixed its anus and emerged through its sexual organ, stands before a prostrate man. The latter (the only crudely drawn figure, and the only human figure in the cave) is rapt in a shamanistic trance. He wears a bird mask; his phallus, erect, is pointing at the pierced bull; a throwing stick lies on the ground at his feet; and beside him stands a wand or staff, bearing on its tip the image of a bird. And then, behind this prostrate shaman, is a large rhinoceros, apparently defecating as it walks away.”

Take out the words “shaman” and “shamanistic” and you have a description of a crude – very crude – interaction of a humanoid with two much larger and more powerful animals. Is he, the humanoid, in a trance or just momentarily overcome by the strength and beauty of the other animals? And what qualifies him as a shaman anyway? The bird motif, which paleoanthropologists, drawing on studies of extant Siberian cultures, automatically associated with shamanism? Similarly, a bipedal figure with a stag’s head, found in the Trois Frères cave in France, is awarded shamanic status, making him or her a kind of priest, although, objectively speaking, they might as well be wearing a party hat. As Judith Thurman wrote in the essay that inspired Werner Herzog’s film The Cave of Forgotten Dreams, “Paleolithic artists, despite their penchant for naturalism, rarely chose to depict human beings, and then did so with a crudeness that smacks of mockery.”

But who are they mocking, other than themselves and, by extension, their distant descendants, ourselves? Of course, our reactions to Paleolithic art may bear no connection to the intentions or feelings of the artists. Yet there are reasons to believe that Paleolithic people had a sense of humour not all that dissimilar from our own. After all, we do seem to share an aesthetic sensibility with them, as evidenced by modern reactions to the gorgeous Paleolithic depictions of animals. As for possible jokes, we have a geologist’s 2018 report of a series of fossilised footprints found in New Mexico. They are the prints of a giant sloth, with much smaller human footprints inside them, suggesting that the humans were deliberately matching the sloth’s stride and following it from a close distance. Practice for hunting? Or, as one science writer for The Atlantic suggested, is there “something almost playful” about the superimposed footprints, suggesting “a bunch of teenage kids harassing the sloths for kicks”?

Cueva de los Manos in Argentina. Photograph: Alamy

Then there is the mystery of the exploding Venuses, where we once again encounter the thin line between the religious and the ridiculous. In the 1920s, in what is now the Czech Republic, archeologists discovered the site of a Paleolithic ceramics workshop that seemed to specialise in carefully crafted little figures of animals and, intriguingly, of fat women with huge breasts and buttocks (although, consistent with the fashion of the times, no faces). These were the “Venuses,” originally judged to be either “fertility symbols” or examples of Paleolithic pornography.

To the consternation of generations of researchers, the figures consisted almost entirely of fragments. Shoddy craftsmanship, perhaps? An overheated kiln? Then, in 1989, an ingenious team of archeologists figured out that the clay used to make the figurines had been deliberately treated so that it would explode when tossed into a fire, creating what an art historian called a loud – and one would think, dangerous – display of “Paleolithic pyrotechnics.” This, the Washington Post’s account concluded ominously, is “the earliest evidence that man created imagery only to destroy it”.

Or we could look at the behaviour of extant stone age people, which is by no means a reliable guide to that of our distant ancestors, but may contain clues as to their comical abilities. Evolutionary psychiatrists point out that anthropologists contacting previously isolated peoples such as 19th-century Indigenous Australians found them joking in ways comprehensible even to anthropologists. Furthermore, anthropologists report that many of the remaining hunter-gatherers are “fiercely egalitarian”, deploying humour to subdue the ego of anyone who gets out of line: “Yes, when a young man kills much meat he comes to think of himself as a chief or a big man, and he thinks of the rest of us as his servants or inferiors,” one Kalahari hunter told the anthropologist Richard B Lee in 1968. “We can’t accept this. We refuse one who boasts, for someday his pride will make him kill somebody. So we always speak of his meat as worthless. This way we cool his heart and make him gentle.”

Some lucky hunters don’t wait to be ridiculed, choosing instead to disparage the meat they have acquired as soon as they arrive back at camp. In the context of a close-knit human group, self-mockery can be self-protective.

In the Paleolithic age, humans were probably less concerned about the opinions of other humans than with the actions and intentions of the far more numerous megafauna around them. Would the herd of bison stop at a certain watering hole? Would lions show up to attack them? Would it be safe for humans to grab at whatever scraps of bison were left over from the lions’ meal? The vein of silliness that seems to run through Paleolithic art may grow out of an accurate perception of humans’ place in the world. Our ancestors occupied a lowly spot in the food chain, at least compared to the megafauna, but at the same time they were capable of understanding and depicting how lowly it was. They knew they were meat, and they also seemed to know that they knew they were meat – meat that could think. And that, if you think about it long enough, is almost funny.

Paleolithic people were definitely capable of depicting more realistic humans than stick figures – human figures with faces, muscles and curves formed by pregnancy or fat. Tiles found on the floor of the La Marche cave in France are etched with distinctive faces, some topped with caps, and have been dated to 14-15,000 years ago. A solemn, oddly triangular, female face carved in ivory was found in late 19th-century France and recently dated to about 24,000 years ago. Then there are the above mentioned “Venus” figurines found scattered about Eurasia from about the same time. But all these are small and were apparently meant to be carried around, like amulets, perhaps – as cave paintings obviously could not be. Cave paintings stay in their caves.

What is it about caves? The attraction of caves as art studios and galleries does not stem from the fact that they were convenient for the artists. In fact, there is no evidence of continuous human habitation in the decorated caves, and certainly none in the deepest, hardest-to-access crannies reserved for the most spectacular animal paintings. Cave artists are not to be confused with “cavemen”.

The Cave of Altamira in Spain. Photograph: Pedro Puente Hoyos/EPA

Nor do we need to posit any special human affinity for caves, since the art they contain came down to us through a simple process of natural selection: outdoor art, such as figurines and painted rocks, is exposed to the elements and unlikely to last for tens of thousands of years. Paleolithic people seem to have painted all kinds of surfaces, including leather derived from animals, as well as their own bodies and faces, with the same kinds of ochre they used on cave walls. The difference is that the paintings on cave walls were well enough protected from rain and wind and climate change to survive for tens of millennia. If there was something special about caves, it was that they are ideal storage lockers. “Caves,” as paleoarcheologist April Nowell puts it, “are funny little microcosms that protect paint.”

If the painters of Lascaux were aware of the preservative properties of caves, did they anticipate future visits to the same site, either by themselves or others? Before the intrusion of civilisation into their territories, hunter-gatherers were “non-sedentary” people – perpetual wanderers. They moved to follow seasonal animal migrations and the ripening of fruits, probably even to escape from the human faeces that inevitably piled up around their campsites. These smaller migrations, reinforced by intense and oscillating climate change in the Horn of Africa, added up to the prolonged exodus from that continent to the Arabian peninsula and hence to the rest of the globe. With so much churning and relocating going on, it’s possible that Paleolithic people could conceive of returning to a decorated cave or, in an even greater leap of the imagination, foresee visits by others like themselves. If so, the cave art should be thought of as a sort of hard drive, and the paintings as information – and not only “Here are some of the animals you will encounter around here,” but also “Here we are, creatures like yourselves, and this is what we know.”

Multiple visits by different groups of humans, perhaps over long periods of time, could explain the strange fact that, as the intrepid French boys observed, the animals painted on cave walls seem to be moving. There is nothing supernatural at work here. Look closely, and you see that the animal figures are usually composed of superimposed lines, suggesting that new arrivals in the cave painted over the lines that were already there, more or less like children learning to write the letters of the alphabet. So the cave was not merely a museum. It was an art school where people learned to paint from those who had come before them, and went on to apply their skills to the next suitable cave they came across. In the process, and with some help from flickering lights, they created animation. The movement of bands of people across the landscape led to the apparent movement of animals on the cave walls. As humans painted over older artwork, moved on, and painted again, over tens of thousands of years, cave art – or, in the absence of caves, rock art – became a global meme.

There is something else about caves. Not only were they storage spaces for precious artwork, they were also gathering places for humans, possibly up to 100 at a time in some of the larger chambers. To paleoanthropologists, especially those leaning toward magico-religious explanations, such spaces inevitably suggest rituals, making the decorated cave a kind of cathedral within which humans communed with a higher power. Visual art may have been only one part of the uplifting spectacle; recently, much attention has been paid to the acoustic properties of decorated caves and how they may have generated awe-inspiring reverberant sounds. People sang, chanted or drummed, stared at the lifelike animals around them, and perhaps got high: the cave as an ideal venue for a rave. Or maybe they took, say, psychedelic mushrooms they found growing wild, and then painted the animals, a possibility suggested by a few modern reports from San people in southern Africa, who dance themselves into a trance state before getting down to work.

The Lascaux caves in France. Photograph: Alamy

Each decoration of a new cave, or redecoration of an old one, required the collective effort of tens or possibly scores of people. Twentieth-century archeologists liked to imagine they were seeing the work of especially talented individuals – artists or shamans. But as Gregory Curtis points out in his book The Cave Painters, it took a crowd to decorate a cave – people to inspect the cave walls for cracks and protuberances suggestive of megafauna shapes, people to haul logs into the cave to construct the scaffolding from which the artists worked, people to mix the ochre paint, and still others to provide the workers with food and water. Careful analysis of the handprints found in so many caves reveals that the participants included women and men, adults and children. If cave art had a function other than preserving information and enhancing ecstatic rituals, it was to teach the value of cooperation, which – to the point of self-sacrifice – was essential for both communal hunting and collective defence.

In his book Sapiens, Yuval Noah Harari emphasises the importance of collective effort in the evolution of modern humans. Individual skill and courage helped, but so did the willingness to stand with one’s band: not to scatter when a dangerous animal approached, not to climb a tree and leave the baby behind. Maybe, in the ever-challenging context of an animal-dominated planet, the demand for human solidarity so far exceeded the need for individual recognition that, at least in artistic representation, humans didn’t need faces.

All this cave painting, migrating and repainting came to an end roughly 12,000 years ago, with what has been applauded as the “Neolithic revolution”. Lacking pack animals and perhaps tired of walking, humans began to settle down in villages, and eventually walled cities; they invented agriculture and domesticated many of the wild animals whose ancestors had figured so prominently in cave art. They learned to weave, brew beer, smelt ore and craft ever-sharper blades.

But whatever comforts sedentism brought came at a terrible price: property, in the form of stored grain and edible herds, segmented societies into classes – a process anthropologists prudently term “social stratification”– and seduced humans into warfare. War led to the institution of slavery, especially for the women of the defeated side (defeated males were usually slaughtered) and stamped the entire female gender with the stigma attached to concubines and domestic servants. Men did better, or at least a few of them, with the most outstanding commanders rising to the status of kings and eventually emperors. Wherever sedentism and agriculture took hold, from China to South and Central America, coercion by the powerful replaced cooperation among equals. In Jared Diamond’s blunt assessment, the Neolithic revolution was “the worst mistake in the history of the human race”.

Lions, rhino and buffalos drawn in charcoal more than 30,000 years ago in the Chauvet cave in south-east France. Photograph: AFP

At least it gave us faces. Starting with the implacable “mother goddesses” of the Neolithic Middle East, and moving on to the sudden proliferation of kings and heroes in the Bronze Age, the emergence of human faces seems to mark a characterological change – from the solidaristic ethos of small, migrating bands to what we now know as narcissism. Kings and occasionally their consorts were the first to enjoy the new marks of personal superiority – crowns, jewellery, masses of slaves, and the arrogance that went along with such things. Over the centuries, narcissism spread downward to the bourgeoisie, who, in 17th-century Europe, were beginning to write memoirs and commission their own portraits. In our own time, anyone who can afford a smartphone can propagate their own image, publish their most fleeting thoughts on social media and burnish their unique brand. Narcissism has been democratised and is available, at least in crumb-sized morsels, to us all.

So what do we need decorated caves for any more? One disturbing possible use for them has arisen in just the last decade or so – as shelters to hide out in until the apocalypse blows over. With the seas rising, the weather turning into a series of psychostorms, and the world’s poor becoming ever more restive, the super-rich are buying up abandoned nuclear silos and converting them into doomsday bunkers that can house up to a dozen families, plus guards and servants, at a time. These are fake caves of course, but they are wondrously outfitted – with swimming pools, gyms, shooting ranges, “outdoor” cafes – and decorated with precious artworks and huge LED screens displaying what remains of the outside world.

But it’s the Paleolithic caves we need to return to, and not just because they are still capable of inspiring transcendent experiences and connecting us with the long-lost natural world. We should be drawn back to them for the message they have reliably preserved for more than 10,000 generations. Granted, it was not intended for us, this message, nor could its authors have imagined such perverse and self-destructive descendants as we have become. But it’s in our hands now, still illegible unless we push back hard against the artificial dividing line between history and prehistory, hieroglyphs and petroglyphs, between the “primitive” and the “advanced.” This will take all of our skills and knowledge – from art history to uranium-thorium dating techniques to best practices for international cooperation. But it will be worth the effort, because our Paleolithic ancestors, with their faceless humanoids and capacity for silliness, seem to have known something we strain to imagine.

They knew where they stood in the scheme of things, which was not very high, and this seems to have made them laugh. I strongly suspect that we will not survive the mass extinction we have prepared for ourselves unless we too finally get the joke.

This article first appeared in the Baffler magazine

• Follow the Long Read on Twitter at @gdnlongread, and sign up to the long read weekly email here.