Hairworms are parasitic worms belonging to the phylum Nematomorpha, a group of roughly 350 described species that develop inside the bodies of insects and other arthropods before emerging as free-living adults in water. They are best known for something genuinely unsettling: when mature, they hijack their host’s behavior and steer it toward water, where the worm can escape and reproduce. The science behind that manipulation, and the ripple effects it has across entire ecosystems, turns out to be far more intricate than the simple horror-movie version of the story.
What Hairworms Actually Are
Despite looking a lot like roundworms, hairworms belong to their own phylum. The group splits into two broad categories: freshwater hairworms (order Gordiida, sometimes called gordiaceans or horsehair worms) and marine hairworms (order Nectonematoidea). Freshwater species are by far the more studied group. They typically develop inside large terrestrial insects like crickets, grasshoppers, and mantids, but all of them eventually need freshwater to mate and lay eggs. Marine species parasitize crabs and other crustaceans; one species described from New Zealand, for example, infects the purple rock crab and was the first record of the marine genus Nectonema from the South Pacific.
Adults are strikingly thin and wiry, sometimes exceeding 30 centimeters in length while remaining barely a millimeter wide. They look like animated strands of dark thread. The common name “horsehair worm” comes from an old folk belief that they spontaneously generated from horsehairs that fell into water troughs. Free-living adults do not feed at all; they have a reduced, nonfunctional gut. Their entire adult life is devoted to finding a mate and reproducing before they die, usually within a few weeks.
The Life Cycle
A hairworm’s life cycle involves at least two hosts and begins in water. After mating, females deposit strings of eggs on submerged vegetation or rocks. The eggs hatch into microscopic larvae, which become infective within a timeframe that depends on water temperature; in one study from a mountain stream in Japan, larvae became infective to aquatic insect larvae from September through November as temperatures dropped.1Ecological Research. Host phenologies and the life history of horsehair worms (Nematomorpha, Gordiida) in a mountain stream in northern Japan These larvae are eaten by, or bore into, aquatic insects like mayfly or midge larvae, where they encyst and wait. The aquatic insect is not the final host. Instead, it serves as an intermediate or “transport” host, carrying the dormant cyst.2PubMed. Varying levels of melanotic encapsulation of gordiid hairworm cysts (Nematomorpha) by aquatic insect larvae: seasonal and host effects
The cycle advances when a terrestrial insect, typically a cricket, grasshopper, or mantid, eats the infected aquatic insect (or an adult that recently emerged from the water, carrying the cyst). Inside the terrestrial host, the larva breaks free from its cyst and begins growing, absorbing nutrients directly through its body wall. Over weeks to months, the worm elongates dramatically, eventually filling most of the host’s body cavity. When the worm reaches sexual maturity, the final and most dramatic phase begins: it must get back to water.
How Hairworms Hijack Their Hosts
The water-seeking behavior hairworms induce in their hosts is one of the most studied examples of parasite-driven manipulation in biology. Infected crickets become far more likely to jump into water than uninfected ones. Researchers initially suspected the insects might detect water from a distance, but experiments with the cricket species Paragordius tricuspidatus suggest something different: infected insects first display erratic, hyperactive behavior that brings them close to water by chance, and then a distinct behavioral shift makes them enter it.
One key mechanism involves light. Uninfected crickets and grasshoppers are normally nocturnal and avoid light. Infected individuals, by contrast, develop a strong attraction to light, moving toward it along straighter, more efficient paths.3PubMed Central. Water-seeking behavior in worm-infected crickets and reversibility of parasitic manipulation Since bodies of water reflect light, especially at night under moonlight, this shift in phototaxis effectively steers the host toward streams and ponds.
The manipulation goes even deeper in mantids. A 2021 study showed that praying mantids infected with the hairworm Chordodes were attracted specifically to horizontally polarized light, the kind reflected by flat water surfaces. Uninfected mantids showed no such attraction. In a field experiment, 14 infected mantids entered a deep pool with strongly polarized surface reflections, while only two entered a shallow pool that was brighter but less polarized.4PubMed. Enhanced polarotaxis can explain water-entry behaviour of mantids infected with nematomorph parasites The parasite was exploiting a sensory channel the host already possessed but wouldn’t normally use in that context.
The Molecular Toolbox Behind the Manipulation
How does a worm sitting in a cricket’s abdomen rewire the cricket’s brain? Proteomic studies, which look at which proteins are being produced in a host’s nervous system, have found that hairworms disrupt their hosts at a molecular level. In grasshoppers harboring mature hairworms, researchers detected differential expression of proteins linked to neurotransmitter activity in the brain. Strikingly, the worms themselves appear to produce molecules from the Wnt signaling family that mimic insect versions of those same proteins, acting directly on the host’s central nervous system.5PubMed Central. Behavioural manipulation in a grasshopper harbouring hairworm: a proteomics approach This molecular mimicry essentially lets the parasite speak the host’s own neurochemical language.
Subsequent work found that the pattern of manipulation is remarkably consistent across different host species. Proteins involved in energy generation are disrupted, which may explain the erratic hyperactive behavior seen in infected insects. Proteins involved in the structure of axons, dendrites, and synapses are altered, pointing to direct neuronal remodeling. And a protein called CamKII, which plays a central role in memory formation, is suppressed, suggesting the parasite may be interfering with the host’s spatial memory.6PubMed Central. A molecular war: convergent and ontogenetic evidence for adaptive host manipulation in related parasites infecting divergent hosts
Perhaps the most surprising finding came from genomic work published in 2023, which revealed that hairworm genomes contain a large number of genes that appear to have been acquired horizontally from their insect hosts. Many of these acquired genes were actively upregulated during the manipulation phase, suggesting that over evolutionary time, hairworms essentially stole genetic instructions from insects and now use them against their descendants.7PubMed. Massive horizontal gene transfer and the evolution of nematomorph-driven behavioral manipulation of mantids
What Hairworm Infection Does to the Host’s Body
The behavioral hijacking grabs attention, but the physical toll on the host is severe well before the dramatic water plunge. A hairworm grows to fill most of its host’s body cavity, physically displacing organs and absorbing nutrients. A recent experimental study on house crickets infected with Paragordius varius found that infected females ate about 14% less food than uninfected ones. More dramatically, when researchers accounted for the mass of the parasite itself, uninfected crickets converted food into body mass about 3.7 times more efficiently than infected ones. Infected females produced zero eggs and had significantly reduced fat stores and ovipositor growth.8PubMed. Parasitic Worms Impair Nutrient Assimilation and Reproductive Investment without Altering Macronutrient Preference in Female House Crickets
Proteomic analysis of infected crickets has also revealed immune signatures. Four hemocyanin proteins (which have immune-related functions in insects) increased in abundance in infected animals, alongside shifts in lectins and other regulatory molecules. At the same time, vitellogenin proteins, which serve double duty in reproduction and immune defense, dropped sharply. So the host’s immune system is responding, but appears to be losing the fight on multiple fronts simultaneously.9PLOS ONE. Dehydration does not drive host behavioural manipulation by hairworms
Interestingly, the same proteomic study tested whether dehydration might explain the water-seeking behavior, since a massive internal parasite could plausibly dry out its host. The answer was clear: the protein signatures of infection and dehydration were completely distinct with zero overlap, ruling out thirst as the driver of the behavioral change.10PLOS ONE. Dehydration does not drive host behavioural manipulation by hairworms
Life After the Worm
One of the more counterintuitive facts about hairworm infection is that the host often survives the worm’s exit. When the manipulated insect hits water, the adult worm emerges (usually from the rear end), and the host can crawl or hop away. This is not a given, since many hosts drown, but the emergence itself is not inherently lethal. Infected crickets that successfully released their worms survived an average of 73 days afterward, though their lifespans were shortened by roughly 13 days compared to uninfected controls.11PubMed. Is there life after parasitism? Survival, longevity, and oogenesis in Acheta domesticus (Orthoptera: Gryllidae) infected with the hairworm, Paragordius varius (Phylum: Nematomorpha)
Even more surprising, about half of previously infected female crickets went on to produce eggs after their parasites were gone.12PubMed. Is there life after parasitism? Survival, longevity, and oogenesis in Acheta domesticus (Orthoptera: Gryllidae) infected with the hairworm, Paragordius varius (Phylum: Nematomorpha) This contradicts the assumption that infection is essentially a death sentence. The behavioral manipulation itself also appears reversible; studies of light-attraction in infected crickets showed that the phototaxis faded once the worm departed.13PubMed Central. Water-seeking behavior in worm-infected crickets and reversibility of parasitic manipulation The host’s nervous system, while temporarily commandeered, is not permanently rewired.
Ripple Effects Through Entire Ecosystems
Hairworms might sound like a problem confined to individual unlucky insects, but their manipulation has measurable consequences for stream ecosystems. When infected crickets and grasshoppers leap into mountain streams, they become food for fish. In five Japanese mountain streams, researchers found that between 22% and 61% of trout had been feeding on camel crickets, and hairworm-infected crickets were consistently present in the fish that ate them.14Canadian Journal of Zoology. Parasite-mediated allochthonous input: Do hairworms enhance subsidized predation of stream salmonids on crickets?
A landmark study quantified this energy transfer and found that infected orthopterans accounted for roughly 60% of the annual energy intake of endangered Japanese trout populations. The trout grew fastest in autumn, precisely when hairworms were driving the most insects into the water.15PubMed. Nematomorph parasites drive energy flow through a riparian ecosystem This was the first quantitative evidence that a manipulative parasite could dramatically reshape energy flow across ecosystem boundaries, moving terrestrial calories into aquatic food webs.
The cascading effects go further. When trout have access to abundant infected crickets, they eat fewer stream-bottom invertebrates like mayflies and caddisflies. That release from predation allows those invertebrate populations to grow, which in turn increases their grazing on algae and their processing of leaf litter that falls into streams.16PubMed. Nematomorph parasites indirectly alter the food web and ecosystem function of streams through behavioural manipulation of their cricket hosts A parasite barely visible inside a cricket’s body ends up shaping the algae coating rocks and the speed at which dead leaves break down in a stream. That chain of influence is about as far from what most people picture when they hear “parasitic worm” as you can get.
Are Hairworms Dangerous to People?
If you’ve ever found a long, dark, writhing worm in a toilet, a pet’s water bowl, or a garden puddle, there’s a reasonable chance it was a hairworm. This understandably raises alarm. Rare case reports exist of hairworms turning up in human vomit or being found in a person’s mouth; two such cases were documented in Japan, involving an elderly woman and a one-year-old boy.17PubMed Central. Two human cases infected by the horsehair worm, Parachordodes sp. (Nematomorpha: Chordodidae), in Japan These cases almost certainly resulted from accidentally ingesting an infected insect or drinking water containing a free-living worm.
The key reassurance is that hairworms are not parasites of humans. They cannot infect you, cannot develop inside you, and pose no threat to human health. When a hairworm ends up in or on a person, it is classified as a “pseudoparasite,” a term for an organism found in association with a host it cannot actually exploit. A review of human encounters with hairworms concluded that these incidents do not represent genuine parasitism and are not a public health concern.18PubMed Central. Human Encounter with a Horsehair Worm (Nematomorpha): Is There a Reason To Worry? The worms end up in toilets and water containers because infected insects are drawn to those water sources, release their worms, and leave the worms behind.
Gordian Knots and the Mating Tangle
Once free-living adults find water, they seek mates, and this process produces one of the more visually arresting phenomena in invertebrate biology. Multiple hairworms often converge on the same spot and entwine into dense, writhing balls that can contain dozens of individuals. These tangles are called “Gordian knots,” a reference to the mythical knot of King Gordius that Alexander the Great famously cut. The name Gordiida for the freshwater order comes from this same allusion. Despite their visual prominence, the ecology of these mating aggregations remains poorly understood, including basic questions about what cues draw the worms together and how females select mates within the tangle.19Invertebrate Biology. Ecology of Gordian knots in natural conditions
Ancient Parasites in Amber
Hairworms are not a recent evolutionary innovation. The oldest known fossil hairworm, Cretachordodes burmitis, was preserved in Burmese amber dated to 100 to 110 million years ago, placing it firmly in the Early Cretaceous alongside dinosaurs. The specimen had already emerged from its host, but a companion fossil in the same amber deposit caught a related parasitic worm (a mermithid nematode) in the act of exiting a biting midge.20PubMed. Nematode (Nematoda: Mermithidae) and hairworm (Nematomorpha: Chordodidae) parasites in Early Cretaceous amber This fossil remains the only known Mesozoic hairworm specimen, which speaks to how rarely soft-bodied parasites get preserved. Their parasitic lifestyle, and likely their host-manipulating abilities, have had an extraordinarily long evolutionary runway.
Hairworms and Environmental Change
Because hairworm larvae spend their early lives as free-swimming organisms in freshwater, they are exposed to whatever is in that water. Recent research on the South American hairworm Chordodes nobilii tested how its larvae respond to the herbicide glyphosate under varying environmental conditions. The larvae proved sensitive to the pollutant, and the researchers raised the possibility of using hairworm larvae as bioindicators of water quality. In the broader context of warming temperatures, this sensitivity raises concerns: if hairworm populations decline because their aquatic larval stage is vulnerable to pollution or thermal stress, the downstream effects on host-parasite dynamics and the energy subsidies they provide to stream food webs could shift as well.21PubMed. Glyphosate-environmental variables interaction: How does it affect the parasite Chordodes nobilii?
Aquatic insect larvae, the intermediate hosts that carry dormant hairworm cysts, also mount their own defenses. Some species encapsulate the cysts with melanin, a pigment-based immune response that can kill the parasite inside. The degree of encapsulation varies by insect species and by season, suggesting that not every cyst makes it through the intermediate host alive.22PubMed. Varying levels of melanotic encapsulation of gordiid hairworm cysts (Nematomorpha) by aquatic insect larvae: seasonal and host effects The hairworm life cycle, in other words, is far from guaranteed at any stage. Eggs must survive in water. Larvae must find and infect an aquatic host without being encapsulated. The cyst must end up inside a suitable terrestrial insect. The worm must grow to maturity, manipulate its host into water, find a mate, and reproduce before dying. Each step is a bottleneck, and environmental pressures at the aquatic stage could tighten the most vulnerable one.

