The first mammals first lived some 160 million years ago, in a world ruled by reptiles. And now scientists suggest that hiding in the dark from these terrifying beasts may have left an imprint in mammals’ genes that can still be seen today.

Most mammals were no bigger than a squirrel back then, and it would have been much safer to come out only at night, thereby avoiding most of the nastiest maws and claws. (Related: “Chisel-Toothed Beasts Push Back Origin of Mammals”)

A new study published Thursday in Current Biology suggests that living largely in the dark for millions of years might explain how mammals lost a light-sensitive trick that nearly every other living thing possesses.

You see, if you were to examine the DNA of a turtle, an orchid, a coral, or even a bacterium, you would find a quirky little set of genes that allows these organisms to repair damage caused by one kind of sunlight with energy absorbed from another kind of sunlight.

Think of it like a solar panel that is both harmed and healed by the sun.

It’s a handy, efficient trick, which scientists call photoreactivation. The strange thing is, while photoreactivation is commonplace in living things, humans don’t have it.

And neither do the rest of the placental mammals, a group includes everything from dogs and cats to wolverines and whales. (Meet the ancestor of all placental mammals.)

The nocturnal bottleneck

How is it possible that we lost an evolutionary strategy so advantageous it’s been found in every other living thing where scientists have looked for it? Well, you might blame the dinosaurs—or at least how scary they were.

All that time spent in darkness, when most dinosaurs weren’t active, may have affected the way placental mammals evolved. Scientists call this theory the “nocturnal bottleneck,” and it’s supported by various mammalian oddities such as the shape of our eyes, the composition of our retinas, and our heightened senses of smell and hearing—all of which point to a long history of living in the dark. (Learn more about the rise of mammals.)

“Of course, [the nocturnal bottleneck] is impossible to prove, until we build a time machine,” says Nicholas Foulkes, a zoologist at the Karlsruhe Institute of Technology in Germany.

However, Foulkes and his colleagues say they have found new evidence that supports the theory of the bottleneck. In their new study, the authors report the discovery of another animal that seems to have lost the ability to repair its DNA with photoreactivation.

Interestingly, it’s not a mammal at all, but instead a tiny fish with no eyes.

Hello darkness, my old friend

It’s been approximately three million years since a Somalian blind cave fish last saw the sun. This is because the waters that connected these animals to the surface dried up long ago, and they have had to adapt instead to a life spent entirely underground in submerged caves.

Today the cave fish appear as ghostly white and pink creatures no bigger than the miniature candy bars given out at Halloween. Where their eyeballs should be, there’s now nothing but a bare patch of skin.

Of course, that’s not the only odd thing about these cave fish. While Somalian blind cave fish still possess the genes required for photoreactivation, they no longer seem capable of activating them.

The Ancient Mammal No One Knew Existed

When Foulkes’ team exposed cave fish embryos to ultraviolet radiation, like that produced by the sun, they died at higher rates than the control group of zebrafish embryos, which appeared able to at least partly heal themselves. The scientists also tested both fishes’ individual cells, finding that again, zebrafish cells could recover after UV exposure, whereas the cave fish’s cells could not.

“Our work shows just how far this goes,” says Foulkes. “Even at the level of how these cave fish repair their DNA, it’s changing in this environment.”

As to how this connects with the story of mammals, Foulkes says it shows that at least one other organism is on its way to losing its photoreactivation ability after many generations spent in darkness.

The lost world

We may be witnessing the cave fish “replay” a process that happened in mammals so many years ago, says Roelof Hut, an evolutionary biologist at the University of Groningen in the Netherlands who reviewed the new study.

“It is one of these unique opportunities where current or recent biological processes provide us with a possible peek-hole into the much more distant past,” he says.

However, Hut notes that while the research adds a piece of circumstantial evidence that mammals went through a nocturnal bottleneck, there’s no proof that placental mammals lost photoreactivation in the same way cave fish did.

Cave fish are also not a perfect comparison to mammals, says Roi Maor, an evolutionary biologist at Tel Aviv University in Israel.

“The cave fish that have been studied here have been isolated for three million years,” says Maor. “Whereas the nocturnal bottleneck that we’re talking about was at least 100 million years. So it’s a completely different time scale.”

Maor also says that while ancient mammals were mostly nocturnal, they would have probably seen some sunlight now and then. It’s not like they were trapped in a cave, after all.