Broadway’s Lilla Crawford stars as Little Red Riding Hood in the film version of “Into the Woods,” which is based largely on the fairy tales of the Grimm Brothers. (Peter Mountain/Copyright 2014 Disney Enterprises, Inc.)

Jacob and Wilhelm Grimm weren’t trying to get famous writing stories for kids.

The brothers were trained philologists, serious young men who grew up in poverty and wanted to make a name for themselves doing something important. They had a cause (German nationalism) and a mission: to uncover the origins of the German language. If they spent a lot of time reading fairy tales, it was because they believed those stories revealed something fundamental about German language and culture. They aimed to trace the evolution of their nation — which, in the mid-19th century, was still so fragmented and in flux it barely warranted the title — via stories about talking animals, clever children, evil stepmothers and tricksters of all sorts.

So they searched old book collections, chatted with friends, sought out some peasant mothers with a few good yarns up their sleeves. And they found something a lot bigger, and older, than the Germans.

According to Sara Graca da Silva and Jamshid Tehrani, authors of a study published Wednesday in the journal Royal Society Open Science, many of the fairy tales we associate with the Grimm Brothers, Hans Christian Anderson and Disney are thousands of years older than the people who first stuck them in a book. Some of them are so old that they predate modern languages and religions — one is even older than writing itself.

Rather than being unique to certain cultures — “Snow White” as essentially German, for example — these stories evolved from a common ancestor, much the same way living things did. And in the same way biologists understand evolution by comparing animals’ DNA, da Silva and Tehrani say they can elucidate mysteries about the origins of cultures by looking at the stories they tell.

Not all of this is new. For more than a century, folklorists have been grouping tales from disparate parts of the world according to shared themes, many of which are charmingly (and perhaps disturbingly) specific — “The Obstinate Wife Learns to Obey” for example, or “The Lecherous Holy Man and the Maiden in a Box.” The Aarne-Thompson-Uther (ATU) classification system, the standard of such groupings, includes more than 2,000 kinds of stories that can be applied to fables from all over the world. Clearly, the tales we use to tease, terrify and lull our kids to sleep share some common cultural DNA.

Indeed, the Brothers Grimm wouldn’t have been surprised by da Silva and Tehrani’s finding. Way back in 1884, Wilhelm Grimm asserted that people who spoke languages that shared Indo-European ancestry — the idea of an Indo-European language family had recently become mainstream — might also share folklore and that the contents of his “Children’s and Household Tales” weren’t simply German but also part of a much broader tradition.

Yet many folklorists dispute this notion. If disparate cultures share stories, they argue, it’s because they’ve been passed through societies by trade, conquest, migration and war. You can’t chart two tales back to a common ancestor because there’s too much cross-contamination.

“The consensus was that these processes would have destroyed any deep signatures of descent from ancient ancestral populations,” Tehrani explained to the Atlantic magazine.

And even if stories bear traces of their ancient origins, theories about their evolution are difficult to prove. Before the printing press, folk tales were transmitted only orally — no medieval monk was going to spend decades illuminating a manuscript about Rapunzel and her unwieldy hair. And however influential they might be, stories don’t leave much in the way of a fossil record. If “Little Red Riding Hood” existed several thousand years ago, the story didn’t leave any physical proof of its presence until someone thought to write it down.

Which is why da Silva and Tehrani approached the task of tracing stories like geneticists, rather than fossil hunters. If a researcher can figure out the relationships between species by scanning their DNA and pinpointing their last common ancestor, why can’t folklorists do the same?

According to Tehrani, an anthropologist at the University of Durham, in Britain, they can.

Folk tales “evolve through similar processes as biological species (variation, selection and inheritance),” he wrote for the Conversation in 2013. Mapping their evolutionary history can fill gaps in the literary record “by using information about the past that has been preserved through the mechanism of inheritance.”

In biology, such mapping is part of phylogenetics, the study of evolutionary history and relationships among organisms. Tehrani published his first phylogenetic analysis of a folk tale in PLOS One in 2013, using “Little Red Riding Hood.”

The story exists in countless forms across Europe, Asia and Africa. There’s the one most Americans know — about a little girl in a red cloak who gets eaten by a wolf dressed as her grandmother. But there’s also a version from East Asia in which a leopard disguised as a grandmother persuades a group of sisters to let him into the house, eating one of the girls before the others escape. Then there’s the story from central Africa of a girl who is tricked by an ogre pretending to be her brother, gets eaten, and is only released when her brother tracks the ogre down and kills the impostor. All of them share traits with another type of story known as “The Wolf and the Kids” in which a group of goat kids are devoured by a wolf who tricks them into thinking it’s their mother.

By analyzing the language, characters and plots from these tales — the stories’ “genes,” so to speak — Tehrani constructed a family tree of the type you might see in an exhibit at a natural history museum. Starting with a single shared ancestor that arose somewhere between Europe and the Middle East about 2,000 years ago, the stories branched off into the groups that would be classified as ATU 333 and ATU 123. The 333 family line would give rise to the familiar Grimm version of Red, while the African version is actually more closely related to the 123 family. The East Asian version, he concluded, is a 333 relative that borrowed some traits from its 123 cousins.

The research offered an interesting look at how stories evolve, but Tehrani argued that its effect is more than just academic.

“Folktales, more than any other type of story, embody our shared fantasies, fears and experiences,” he wrote in 2013. “Understanding which elements of them remain stable and which ones change as they get transmitted across generations and societies can therefore provide a unique window into universal and variable aspects of the human condition.”

Tehrani tackled his next project with that goal in mind. Along with da Silva, who studies intersections between evolution and literature at the New University of Lisbon in Portugal, he pieced together phylogenetic trees for 275 story types from the “Tales of Magic” category in the ATU system.

In 76 cases, the duo was able to trace the story back hundreds or even thousands of years. The oldest of them is a tale about a blacksmith who sells his soul to the Devil in exchange for unmatched smithing powers and who uses them to pin the Devil down, allowing the smith to keep his soul and his new abilities. That tale dates back 6,000 years, to the beginning of the Bronze Age.

If true, this finding may clear up some confusion about the origin of the Proto-Indo-European language speakers who first started telling that story. Very little is known about the people who launched the language family that would come to encompass everything from Sanskrit and Urdu to Latin and English. As Mark Damen, a historian at Utah State University explains it:

“There is still no unequivocal evidence from either historical or archaeological sources for exactly where, when or how the original speakers of Proto-Indo-European lived. No site, no technology, no extant historical text, no particular past event has as yet been definitively associated with the people whose descendants would later spread Indo-European culture and language across the entire globe. The Indo-Europeans are at present in strictest terms a linguistic phenomenon, which is not to say their culture never existed — there is overwhelming evidence it must have at some point in history and, without doubt, somewhere in Eurasia — but that’s not very precise.”

Still, there are generally two schools of thought about where a huge number of the world’s cultural origins might have been. One proposes that Proto-Indo-European language speakers were Neolithic farmers living 9,000 years ago in what is now Turkey, while the second argues that they were pastoralists from the Russian steppes who knew how to work metal.

If it’s true that “The Smith and the Devil” — a story now told in numerous Indo-European languages — really does date back 6,000 years, it could be a boon for the latter school of thought. The 9,000-year-old Turks lived before the invention of metallurgy and were unlikely to have told a story whose hero was a blacksmith. Those Russian pastoralists, on the other hand, fit the bill perfectly. Reconstructed versions of the Indo-European vocabulary include a possible word for metal, according to da Silva and Tehrani’s study, and the fact that these people lived at the beginning of the Bronze Age “suggests a plausible context for the cultural evolution of a tale about a cunning smith who attains a superhuman level of mastery over his craft.”

But this detail was also a sticking point with some other researchers who read the study. John Lindow, a folklorist at the University of California at Berkeley, told Science News that the Proto-Indo-European vocabulary for working with metal was fairly limited. It’s not clear that the term “smith” even existed, he argued, which casts doubt on the claim that “The Smith and the Devil” is as old and significant as Tehrani and da Silva say.

But Tehrani rebutted that argument. And speaking to the Atlantic, he was already envisioning future research into why some tales are told for thousands of years, and what plot elements or motifs seem to persist through the various retellings.

“We think this is the start of a much bigger project using oral traditions and storytelling as windows into the lives of our ancestors,” he said.

Jacob and Wilhelm Grimm, who started that same project 150 years ago, would probably be proud.