Like people, cockroaches like to hang out together, especially when they have nothing else to do. Now, researchers know why. Gut bacteria pooped along with their feces emit odors that the roaches find attractive. When those bacteria are missing, cockroaches tend to go it alone, researchers have discovered. Gut microbes in other organisms may likewise influence behavior in ways we have yet to appreciate.

“We don’t know whether microbes are generally important in mediating chemical communications, but my best guess is that it’s widespread,” says Angela Douglas, who studies microbes and their animal hosts at Cornell University and was not involved with the work. Eavesdropping on microbe-cockroach conversations could lead to better ways to control this common household pest.

Insects typically communicate using odors called pheromones; those that attract males to females are well-studied. Since the 1970s, entomologists have also known that so-called aggregation pheromones encourage roaches to stick close to one another. But researchers never could agree on what those pheromones really are. Some suggested they were waxy substances in the outer skin; others argued they were nitrogen-rich compounds in the feces; and a third group insisted that fatty acids—building blocks for fat—were involved, although which ones exactly was under debate.

Coby Schal, an entomologist at North Carolina State University (NC State) in Raleigh wondered whether the conflicting results meant that different cockroaches depend on different aggregation chemicals because of variation in their environments, food, or gut microbes. So Schal and his team, including NC State entomologist Ayako Wada-Katsumata sterilized German cockroaches, Blattella germanica, and raised them in germ-free cages, so their feces would be germ-free. Usually cockroaches are attracted to their neighbors’ feces, but they tended to avoid the germ-free stuff.

About 80% to 100% of young cockroaches tested preferred feces over sterile water, and although the difference in attraction was not as clear-cut between extracts of germ-free and normal feces, there were significantly more cockroaches aggregating by the normal feces extract, the researchers report online today in the Proceedings of the National Academy of Sciences. Without the microbes in the feces, the cockroaches no longer banded together very much. “The aggregation properties decline tremendously,” Schal says.

When Wada-Katsumata isolated feces bacteria and fed them to the germ-free cockroaches, the roaches once again tended to form groups. Sophisticated chemical analyses of normal roach poop and germ-free poop showed that the latter lacked many of the usual fatty acids that evaporate from the feces once it is exposed to air; the researchers conclude these volatile fatty acids may be the missing aggregation pheromones. Synthetic versions of these compounds also cause cockroaches to aggregate.

“This study explains how different studies in the past have yielded different results,” Douglas says. “It all depends on the microorganisms.” This may be why fatty acid advocates couldn’t agree on which fatty acids were important. Schal says that other candidate aggregation substances, in high concentrations, also seem to help bring the insects together, but these bacteria-produced compounds are much more potent and may be the most important drivers, Coby says.

Other researchers have shown that a specific microbe hosted by desert locusts helps induce crowding behavior in that species. And in 2012, researchers suggested that bacteria living in hyenas' scent glands impart the odors that help these animals tell kin from nonkin or pick out group members. “There’s the potential for this to be widespread,” Schal says.

May Berenbaum, an entomologist at the University of Illinois, Urbana-Champaign, who was not involved with the work agrees. "It has become abundantly clear that insects partner with a tremendous diversity of microbial [associates]—bugs are bug-infested, as it were," she points out. And in cockroaches, they "produce a beautiful story of biological cooperation."

And how about people? What we eat affects the bacteria in our guts, which in turn can affect what we smell like. But although the resulting foul body odor may deter contact, “there’s no evidence the bacteria play a positive role in communication among humans,” Schal says.

He is now studying whether every population of cockroaches (even the ones living in your kitchen versus the ones in your basement) makes its own special aggregation pheromone. Schal and his colleagues hope to develop a synthetic aggregation pheromone that works for all German cockroaches. Such a compound would help lure roaches to insecticides, baits, and traps, Douglas says: “If we can understand the chemistry of cockroach aggregation and its plasticity better, we can devise better strategies for control.”