In the 1980s, scientists discovered that oyster mushrooms are carnivores. The delicious, inescapable inference is that they’re the only vegan food that can itself eat meat.

The meat in question is definitely meat, too. Nematodes, also called roundworms, are little animals complete with guts, nerves, muscles and their own primitive form of hopes and dreams. Oyster mushrooms poison and paralyze nematodes within minutes of contact, inject their filaments into the corpses, dissolve the contents and absorb the slurry.

What was not known was how this fungal poison worked, or how extensive its powers were. A team of Taiwanese scientists that sought to answer those questions published their results last March in the Proceedings of the National Academy of Sciences. They discovered that the fungus targets a part of the worms so indispensable that nematode species separated by more than 280 million years of evolution were equally susceptible.

Before proceeding, however, it’s important to emphasize that oyster mushrooms are far, far from alone among fungi in their eating habits, probably because nematodes are the most abundant animals in soil. The little worms are so common that were the entire planet except nematodes dissolved, a dimly visible Earth-shaped shell of nematodes would be left floating in space.

So, it is perhaps not surprising that this embarrassment of high-quality protein spurred an outburst of fungal evolution. Even so, the sheer devious ingenuity, diversity and abundance of the devices with which fungi responded to the challenge is grimly awe-inspiring.

For example, a few species in a group of fungus-like organisms called oomycetes send nematode-sniffing hunter cells in pursuit of the worms, as do a few species of true fungi called chytrids (the same group that produced the pathogen that has decimated amphibians). They’re like something out of The Matrix, except in swimmy fungus form. Once their target is acquired, they “encyst” near the mouth or anus before injecting themselves into the worm and attacking its internal organs.

A second group of oomycetes in the genus Haptoglossa manufactures infective “harpoon cells.” These prey-seeking, pressurized nematode guns are programmed to glue themselves to a surface, barrel pointed upward. When a nematode blunders into it, a line of weakness snaps, deploying a harpoon that injects enough of the Haptoglossa spore to seal the worm’s demise. Although a similar apparatus is famously found in the stinging cells of jellyfish and coral, this appears to be a completely independent invention of pretty much the same equipment.

Some fungi produce booby-trapped bonbons. These spores have various irritating shapes like sickles, stilettos or—no kidding—chick-shaped marshmallow peeps, all of which seem calculated to lodge in nematode esophagi like fish bones in a diner’s throat. They must be tasty because nematodes swallow them anyway. Once comfortably ensconced, they germinate by puncturing the worm’s gut and then kill and eat it.

Other fungi have evolved sticky branches, knobs or nets coated with nematode super glue. Worms can apparently taste this glue and may violently recoil, a reflex that must sometimes save them. On the other hand, it must work most of the time because at least 40 species of fungi produce such nets.

Then there are the death collars, lethal jewelry that unsuspecting worms swim through, detach, and flaunt while they wander about for a bit—all the better to disperse the fungus—before the ring inevitably injects itself into the nematode, and, well … you know the rest.

A variation on this theme is the inflatable hoop trap. At least 12 different fungal species make constricting snares that inflate like lethal water wings in a tenth of a second. The fungal squeeze is fatal.

These are physical traps, but chemicals can do the job too.

Based solely on appearance, the cream-colored, shellfish-shaped Pleurotus ostreatus is not a fungus you’d suspect of carnivory, but scrutiny of its diet does suggest a need. As everyone who’s hunted or cultivated oyster mushrooms knows, they are wood rotters that are among the first creatures to take a crack at dead trees. As anyone who’s ever tried to eat wood knows, it’s memorably protein-poor.

When starved, the filaments of Pleurotus that live inside wood produce poison drops. Minutes after nematode noses nudge them, the worms’ wriggling slows and stops.

In the present study, all 15 species of Pleurotus fungi the team tested had this ability. Then they chose 17 species of nematode to see if any could survive the poison. None did. The scientists concluded that the mechanism of paralysis had been conserved by evolution across nematode lineages that diverged an estimated 280–430 million years ago.

The scientists suspected that calcium may play a role in the action of the poison. Animal muscles contain extensive calcium storehouses. When nerves tell the muscles to move, the calcium is released and stimulates contraction. When nerves tell them to stop, pumps refill the storehouses with calcium, and the muscle relaxes.

To investigate how the fungus was pulling this off, the scientists created worms with visible calcium and discovered that the ion flooded the pharynx and head muscles of poisoned worms—and stayed there. Very quickly, neurons and muscle cells died in droves.

Thus, the fungal poison probably irreversibly opens a calcium gate and/or jams the calcium pumps that re-stow it. Without a way of putting the calcium back where it belongs, the worm ends up in a rigor mortis that induces death.

Next, by randomly mutating nematodes and looking for poison-resistant individuals, then sequencing the mutants’ genes to see what got broken, the scientists deduced that the fungal poison can only act if the worm makes intact sensory hairs called cilia.

These 60 or so enervated antennae project from the roundworm fuselage and are used to smell, taste, touch, take the temperature, and otherwise sense their environment. Because worms that can’t make functional cilia (rendering them immune to oyster poison) also can’t sense their environment (rendering them blind), it is likely that mutants that can escape Pleurotus cannot survive in the wild, the scientists inferred.

Further tests revealed that the Pleurotus poison’s mechanism is distinct from that of all current nematicides. Nematodes are important parasites of plants, livestock and humans, and resistance to nematicides is growing. A potential drug so completely unknown, broadly effective, and seemingly resistance-proof is decidedly intriguing.

It’s not even the only one. Remember those fungi that make sticky nets? Some of them—and they’re completely unrelated to Pleurotus—also render nematodes comatose within an hour.

This is an opinion and analysis article.