The DNA in our cells, which contains the genetic instructions that make us human, is passed on from parent to child along an unending line of generations. However, as recent experiments in mice have demonstrated, there is more to transgenerational inheritance than that.

Studies have shown that even “learned” experiences, which do not alter the underlying genetic material, can be passed on from one generation to the next — in mice, fruit flies, and possibly even humans.

In a new study published Friday in the journal Science, a team of researchers has shown that such “epigenetic” memories can be passed down for 14 generations in a tiny nematode worm species called Caenorhabditis elegans (roundworms). This is the longest maintenance of transgenerational environmental memory observed in any animal to date.

“We discovered this phenomenon by chance, but it shows that it’s certainly possible to transmit information about the environment down the generations,” study lead author Ben Lehner, a biologist at the Centre for Genomic Regulation (CRG) in Barcelona, said in a statement. “We don’t know exactly why this happens, but it might be a form of biological forward-planning.”

For the purpose of their study, the researchers inserted a gene coding for fluorescent protein in the worms that, when activated, made them glow brightly under ultraviolet light. If the worms were kept at 20 degrees Celsius (68 degrees Fahrenheit), the array of transgenes was less active, creating only a small amount of fluorescent protein, but when they were exposed to a warmer temperature of 25 degrees Celsius (77 degrees Fahrenheit), the activity of the transgenes was significantly increased.

When these worms were moved back to the cooler temperature, their transgenes remained active — a sign that they were retaining the memory of their exposure to warmth. This high activity level was passed on for seven subsequent generations kept solely at 20 degrees.

Surprisingly, the scientists found that keeping worms at 25 degrees for five generations led to the transgene activity being maintained for at least 14 generations even after the worms were returned to cooler conditions. They also found that repetitive parts of the normal worm genome that look similar to the transgene arrays also behaved in the same way, suggesting that this epigenetic memory transfer was not restricted just to the artificially engineered genes.

“Worms are very short-lived, so perhaps they are transmitting memories of past conditions to help their descendants predict what their environment might be like in the future,” the study’s co-lead author Tanya Vavouri from the Josep Carreras Leukaemia Research Institute in Spain, said in the statement.

Although the experiment’s findings are restricted to roundworms and cannot be extrapolated to humans, it does mark an important milestone in the study of the long-lasting effects of epigenetic changes.