Updated: January 12, 2018, 5:05 P.M. ET

When Jason Shepherd first saw the structures under a microscope, he thought they looked like viruses. The problem was: he wasn’t studying viruses.

Shepherd studies a gene called Arc which is active in neurons, and plays a vital role in the brain. A mouse that’s born without Arc can’t learn or form new long-term memories. If it finds some cheese in a maze, it will have completely forgotten the right route the next day. “They can’t seem to respond or adapt to changes in their environment,” says Shepherd, who works at the University of Utah, and has been studying Arc for years. “Arc is really key to transducing the information from those experiences into changes in the brain.”

Despite its importance, Arc has been a very difficult gene to study. Scientists often work out what unusual genes do by comparing them to familiar ones with similar features—but Arc is one-of-a-kind. Other mammals have their own versions of Arc, as do birds, reptiles, and amphibians. But in each animal, Arc seems utterly unique—there’s no other gene quite like it. And Shepherd learned why when his team isolated the proteins that are made by Arc, and looked at them under a powerful microscope.

He saw that these Arc proteins assemble into hollow, spherical shells that look uncannily like viruses. “When we looked at them, we thought: What are these things?” says Shepherd. They reminded him of textbook pictures of HIV, and when he showed the images to HIV experts, they confirmed his suspicions. That, to put it bluntly, was a huge surprise. “Here was a brain gene that makes something that looks like a virus,” Shepherd says.

That’s not a coincidence. The team showed that Arc descends from an ancient group of genes called gypsy retrotransposons, which exist in the genomes of various animals, but can behave like their own independent entities.* They can make new copies of themselves, and paste those duplicates elsewhere in their host genomes. At some point, some of these genes gained the ability to enclose themselves in a shell of proteins and leave their host cells entirely. That was the origin of retroviruses—the virus family that includes HIV.

So, Arc genes are the evolutionary cousins of these viruses, which explains why they produce shells that look so similar. Specifically, Arc is closely related to a viral gene called gag, which retroviruses like HIV use to build the protein shells that enclose their genetic material. Other scientists had noticed this similarity before. In 2006, one team searched for human genes that look like gag, and they included Arc in their list of candidates. They never followed up on that hint, and “as neuroscientists, we never looked at the genomic papers so we didn’t find it until much later,” says Shepherd.

The similarities don’t end there. When genes are activated, the instructions encoded within their DNA are first transcribed into a related molecule called RNA. Shepherd’s colleague Elissa Pastuzyn showed that the Arc shells can enclose RNA and move it from one neuron to another. And that’s basically what retroviruses do—they use protein shells to protect their own RNA as it moves between cells in a host.

So our neurons use a viral-like gene to transmit genetic information between each other in an oddly virus-like way that, until now, we had no idea about. “Why the hell do neurons want to do this?” Shepherd says. “We don’t know.” One wild possibility is that neurons are using Arc (and its cargo) to influence each other. One cell could use Arc to deliver RNA that changes the genes that are activated in a neighboring cell. Again, “that’s very similar to what a virus does—changing the state of a cell to make its own genes,” says Shepherd.

“We have way more questions now than when we started out,” he says. “What is the RNA cargo? What is the signal [that the Arc shells] are carrying? When Arc is released by a neuron, how far can it travel?” And perhaps more importantly, how does all of this influence the brain? If the team stops neurons from releasing Arc, how does that affect an animal’s ability to learn or to form new memories? “I can see what people are thinking: Is memory a virus?” Shepherd says, laughing.

As if that wasn’t weird enough, other animals seem to have independently evolved their own versions of Arc. Fruit flies have Arc genes, and Shepherd’s colleague Cedric Feschotte showed that these descend from the same group of gypsy retrotransposons that gave rise to ours. But flies and back-boned animals co-opted these genes independently, in two separate events that took place millions of years apart. And yet, both events gave rise to similar genes that do similar things: Another team showed that the fly versions of Arc also sends RNA between neurons in virus-like capsules. “It’s exciting to think that such a process can occur twice,” says Atma Ivancevic from the University of Adelaide.

This discovery has medical implications, too. Arc has been implicated in many brain disorders, like Alzheimer’s, schizophrenia, and Fragile X syndrome. It might also be involved in the mental declines that accompany aging. Shepherd says that young mice produce lots of Arc protein, and old mice make much less. If he artificially boosts Arc protein levels in the visual centers of the brains of old mice, he can make them as responsive to new experiences as those of younger rodents.

“This may be the tip of a giant iceberg,” says Harmit Malik from the Fred Hutchinson Cancer Research Center. It’s entirely possible that animals which lack Arc genes, such as fish, “use entirely different domesticated gag proteins to achieve the same purpose.” Indeed, the human genome has more than 100 gag-derived genes. What are they all doing?

This is part of a broader trend: Scientists have in recent years discovered several ways that animals have used the properties of virus-related genes to their evolutionary advantage. Gag moves genetic information between cells, so it’s perfect as the basis of a communication system. Viruses use another gene called env to merge with host cells and avoid the immune system. Those same properties are vital for the placenta—a mammalian organ that unites the tissues of mothers and babies. And sure enough, a gene called syncytin, which is essential for the creation of placentas, actually descends from env. Much of our biology turns out to be viral in nature.

* This article has been corrected to reflect the fact that Arc genes were co-opted by animals from a group of genes that also gave rise to retroviruses, and are not directly descended from retroviruses, as originally stated. We regret the error.