Interest just keeps building around the microbiome—the trillions of microorganisms that inhabit the bodies of larger animals and seem to play a role in phenomena from human mood and appetite to sex determination in rolly pollies. The latest microbial trick is as icky as it is impressive: Bacteria living in cockroach guts seem to control insect get-togethers by lacing their hosts’ poop with chemical cues.

“Only now are we beginning to appreciate the involvement of microbes in animal communication and behavioral systems,” says Coby Schal, a professor of entomology at North Carolina State University. “This is one of the cleanest examples of this type of thing.”

Past studies into the feces-related facet of the microbiome largely focused on mammals, in particular the role of bacteria-produced fatty acids in hyenas’ scent glands, located near the anus. These chemical signals seem to play a role in helping the canines distinguish members of their group from outsiders. But performing controlled experiments on hyenas is no easy task.

“That’s where insects, especially cockroaches, are handy,” Schal says. “We can easily raise them under sterile conditions, and we can do fecal transplants.”

Schal and his colleagues focused on German cockroaches, the tenacious household pests that infest kitchens, bathrooms and restaurants around the world. Cockroaches have the charming tendency to defecate where they live and sleep, Schal says, and they are also gregarious insects—ones that like to spend their time in groups. Feces, therefore, evolved as an olfactory signal for leading roaches to friends.

“It’s not unreasonable, then, that the signals in feces would be associated with bacteria, because the hindguts of insects are loaded with bacteria,” Schal says.

To put that hypothesis to the test, Schal and his colleagues began by confirming that German cockroaches are indeed attracted to their own feces - a discovery first made by other researchers in the 1970s. They presented lab-reared roaches with a solvent of their kind’s poop and found that, even when they had to detect it from a distance, the roaches made a beeline for the droppings.

“It’s a beautiful behavior where they like the smell of their own feces,” Schal says.

Next the researchers sterilized cockroach eggs and reared the babies in sterile conditions, meaning those insects contained no bacteria in their guts or feces. The team then presented samples of sterile and non-sterile poop to roach nymphs to see which they preferred.

The bacteria-free feces were “incredibly less effective” at catching the attention of other cockroaches, Schal says. When the researchers took a closer look at the sterile versus non-sterile samples, they found that the former largely lacked volatile fatty acids, also known as carboxylic acids, which are fermentation products of bacterial activity.

“Non-sterile feces have massive amounts of these acids, whereas many compounds were missing and most were tremendously underrepresented in sterile feces,” Schal says. “This suggested a correlation between the behavior we were seeing and the chemistry.”

To be extra sure of the connection, the researchers homed in on six of the most prominent compounds and made a synthetic mixture of them, which they found was highly effective at attracting cockroaches and causing them to aggregate.

“So we conclude that it’s the bacteria rather than the cockroach itself that are involved in producing this signal,” Schal says. He and his colleagues reported their findings today in the Proceedings of the National Academy of Sciences.

These “very interesting” findings could have important implications for pest control, according to Philip Koehler, a professor of entomology at the University of Florida who was not involved in the research.

“If you’re able to get cockroaches to aggregate around a treatment, whether a bait or a spray, then you could probably get better control,” he says. “What we do now is put out treatments not based on where cockroaches are but where we expect they are.”

Alternatively, he adds, the feces’ chemistry could be used to lure roaches into a trap, allowing them to be removed from a home or business rather than having to douse the whole structure in chemicals.

Mike Rust, a distinguished professor of entomology at the University of California, Riverside who also was not involved in the research, says that the work was extremely well done and clearly indicates the role that volatile carboxylic acids produced by gut bacteria play in cockroach gatherings.

While he doesn’t think the findings would necessarily increase the effectiveness of baits, he does believe they could be useful for improving application of crack-and-crevice insecticides. Cocktails of aggregation chemicals, he says, “might reduce the repellency of sprays and increase the time cockroaches contact treatment surfaces.”

Schal believes the findings likely apply to all cockroaches that aggregate, including other pest species such as the American cockroach and the oriental cockroach. He and his colleagues plan to investigate such questions in future. He also expects similar findings related to the microbiome’s role in animal signaling and communication might emerge for other types of organisms.

“I think in the next year or so we’re going to see lots of examples of this type of thing occurring in nature, from insects all the way up, possibly, to humans,” he says.