A newfound species of parasitic worm wiggles its way into the brains of baby lizards long before the reptiles hatch.

How do the nematodes break into developing lizard brains? They sneak in through the lizard mothers' ovaries, a surprising new study finds.

Parasitic nematodes that prey on mammals can sometimes jump from mother to offspring through the placenta in utero or through breast milk after birth, the study authors noted in an article-in-press to be published in the May 2020 issue of the journal The American Naturalist. But until now, no one thought that reptiles could pass down their parasites from mother to offspring; evidence suggested that, because they lay eggs, animals like lizards are less vulnerable to certain routes of parasitic transmission.

But much to scientists' surprise, the discovery of worms in lizard embryos suggests that reptilian eggs aren't as impenetrable as once thought.

Related: 8 awful parasite infections that will make your skin crawl

"I was shocked when I saw something moving in the embryo's brain, despite having dissected many lizard eggs before," lead author Nathalie Feiner, an evolutionary biologist at Lund University in Sweden, said in a statement. While studying common wall lizards (Podarcis muralis) across Europe, Feiner and her colleagues routinely dissect and examine developing lizard embryos and find most to be worm-free. However, one population of common wall lizards in the Pyrenees mountain range turned out to be riddled with nematodes.

Wondering where the worms came from, the researchers examined the lizard mothers and found nematodes wriggling in the animals' ovaries. Typically, nematodes invade the intestines of common wall lizards, but the authors hypothesized that this newfound species adapted to thrive in the reproductive system of females. The worms in the ovary infiltrate the embryos of the the developing lizards and enter their brains before a hard egg shell forms around the animal.

The authors allowed several infected lizard embryos to develop to maturity, noting that "infected lizard embryos develop normally and hatch with nematodes residing in their braincase." The animals appear healthy when first hatched, parasites aside, but the researchers did not monitor the lizards further to see how their health and behavior might be affected as they mature, the authors added.

"It would be exciting to know if this vertical transmission [between mother and embryo] is unique to the nematodes we found in the common wall lizards or if this occurs in other species, as well," Feiner said. "It would also be interesting to find out if the lizard’s behavior is affected by having worms in their brains."

Originally published on Live Science