Nematophagous fungi are carnivorous fungi specialized in trapping and digesting nematodes. Around 160 species are known. There exist both species that live inside the nematodes from the beginning and others that catch them, mostly with glue traps or in rings, some of which constrict on contact. Some species possess both types of traps. Another technique is to stun the nematodes using toxins, which is a method employed by Coprinus comatus, Stropharia rugosoannulata, and the family Pleurotaceae. The habit of feeding on nematodes has arisen many times among fungi, as is demonstrated by the fact that nematophagous species are found in all major fungal groups. Nematophagous fungi can be useful in controlling those nematodes that eat crops. Purpureocillium, for example, can be used as a bio-nematicide.
Fungi that feed on nematodes (as the most abundant and convenient prey species) mostly live in nitrogen-deficient habitats. Fungi that feed on nematodes can be divided into four main groups according to the methods they use to catch their prey. Some use a mechanical means, an adhesive or a mechanical hyphal trap. Some produce a toxin and use it to immobilise the nematode. Some are parasitic, using their spores to gain entry into their prey, and some are egg parasites, inserting their hyphal tips into the eggs or cysts, or into females before the eggs are deposited.
Nematophagous fungi have been found throughout the world in a wide range of habitats and climates, but few from extreme environments. Most studied have been the species that attack the nematodes of interest to farmers, horticulturists and foresters, but there are large numbers of species as yet undescribed. The sexual stage of Orbilia occurs on rotting wood on land or in fresh water, while the asexual stage occurs in marine, fresh water and terrestrial habitats. Arthrobotrys dactyloides was the first species to be discovered in brackish water, and other species have been found on mangroves.