Gallhampshire / Flickr

Pillbug. Roly-poly. Woodlouse. Doodle bug. This endearing creature, which goes by many names, is common throughout North America and Europe. It seeks moisture, scurries from light, and rolls into a ball when threatened. And it often finds itself embroiled in an evolutionary war with a bacterium. At stake is its very sexual identity.

In pillbugs, sex is determined by two chromosomes: Z and W. Individuals who inherit two Zs develop as males, while ZW individuals become female. But in some populations, these rules are overwritten by a microbe called Wolbachia.

Wolbachia infects the cells of pillbugs and only passes down the female line; only mothers can transmit the bacterium to their young. Male embryos are dead ends to Wolbachia, so when it runs into them, it feminizes them by interfering with the development of hormone-producing glands. The result is that all young pillbugs infected with Wolbachia grow up into females, even those that are genetically male. In such populations, the W chromosome tends to disappear altogether. Eventually, all the pillbugs are ZZ, and it’s the presence or absence of Wolbachia that dictates whether they become female or male.

It’s astonishing enough that a microbe should so totally take the reins of sex determination from its host. But this story, which a group of French scientists have pieced together over the last 40 years, now has an even more baffling twist.

In the 1980s, the French researchers showed that some pillbugs do not have Wolbachia, but act as if they did. They’re all ZZ, but some still develop as females. The researchers proposed that the bacterium has transferred a piece of its DNA into the pillbug’s genome, and that this “feminizing element”—or f-element—was now dictating the animal’s sexes, even in the microbe’s absence.

With the technology of the 1980s, the researchers had no way of testing their idea. But 30 years on, Richard Cordaux, from the University of Poitiers, has come very close to proving that they were right.

He sequenced the genomes of several Danish pillbugs and showed that they do indeed carry Wolbachia DNA. There was no trace of the bacterium itself, but its genes lingered on within one of the pillbug chromosomes. This new fusion chromosome behaves like the W chromosome of other normal pillbugs: Its presence determines female fate. Females always have it; males never do.

To recap: these pillbugs started off with Z and W chromosomes, where males are ZZ and females are ZW. After becoming infected by feminizing strains of Wolbachia, the W chromosome disappeared and everyone became ZZ; now, it was the presence of the bacterium that separated females from males. Then, by shunting its genes across, the feminizing Wolbachia turned another of the pillbug’s chromosomes into a new sex chromosome, which behaves like the original lost W.

In a roundabout way, the pillbugs have returned to their original set-up. Their sexual identities are once again determined by their own chromosomes—the original Z, and a W v2.0. But of course, Wolbachia is still there, as part of the new W chromosome. Its DNA still controls the pillbug’s sexual identity, even though it’s physically absent.

“I am squealing on the inside. It’s just backwards of how we typically think of sex chromosome evolution,” says Melissa Wilson Sayres, from Arizona State University.

Our own X and Y chromosomes illustrate what usually happens. They were once identical, and carried the same genes. Then, around 300 million years ago, one of them developed a mutation that turned one of its genes into a sex-determining switch, which had the ability to set males apart from females. That chromosome eventually became the Y. Its counterpart became the X.  

That’s the typical path: Something that was shared between two chromosomes becomes different, leading the pair to evolve in separate directions. But in the case of the pillbugs, the difference arose “because of incorporation of DNA from a whole different species,” says Wilson Sayres. “Evolution never ceases to amaze me.

Julie Dunning-Hotopp, from the University of Maryland, is slightly skeptical. She has discovered many examples of animals with Wolbachia genes in their genomes, including a fruit fly that harbors the bacterium’s entire genome. She’s “fairly convinced” that Cordaux’s pillbugs also contain Wolbachia DNA, but isn’t sure that DNA is what’s determining the animal’s sexes. Another gene might be responsible, and the Wolbachia DNA might just be sitting next to it.

The only way to tell for sure is to show that the Wolbachia genes are actually being switched on, in a way that affects the development of the young pillbugs. “Those are the experiments we’re currently doing,” says Cordaux.  

And Nancy Moran, from the University of Texas at Austin, thinks that there are probably many other examples where symbiotic microbes have driven the evolution of animal sexes. “A lot of findings for symbionts start out with one odd case, which then turn out to be widespread,” she says. “It seems likely that this will not be the only case.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.