Scientists trying to solve this mystery recently grew mushrooms in the lab, unleashed fungi-eating nematodes on them and videotaped the aftermath. They found that the fungi somehow sensed the predators and sent signals to other parts of their bodies. Their findings, published recently in Current Biology, shed new light on how the many cells within even primitive organisms communicate like plants or animals.

Image Coprinopsis cinerea, or the gray shag mushroom, growing in California. Credit... iStock/Getty Images

“They may appear simple, but they share features that are also known for more complicated organisms,” said Markus Künzler, a microbiologist at ETH Zürich in Switzerland who led the study. “There is internal communication going on that we know very little about.”

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

What we do know is that fungi-loving nematodes ingest their dinner like creepy, syringe-wielding serial killers. The worm uses a needle on its head to puncture the mushroom’s hyphae — the stringy filaments that make up its mycelium, or vegetative body — and suck out its cellular content.

Under attack, Coprinopsis cinerea, the mushroom commonly known as the “gray shag” or “inky cap” and often used in fungi research, puts up a slow, but steady fight.

Dr. Künzler and his colleagues paired the fungi and nematodes in a lab setting, and also added a dye to the mushrooms that glows under a microscope. They watched the mushroom’s response travel in the form of genes activating, lighting up as its warning message propagated up and down the fungus’s fattest hyphae. It did so every few hours — and it switched directions. As they switched on in succession, the genes produced a nasty toxin the nematodes don’t like.