It leads successively into the pharynx, a short oesophagus, a crop (in some species), a stomach and a hindgut, which ends at an anus located just above the posterior sucker. The stomach may be a simple tube, but the crop, when present, is an enlarged part of the midgut with a number of pairs of ceca that store ingested blood. The leech secretes an anticoagulant, hirudin, in its saliva which prevents the blood from clotting before ingestion. A mature medicinal leech may feed only twice a year, taking months to digest a blood meal. The bodies of predatory leeches are similar, though instead of a jaw many have a protrusible proboscis, which for most of the time they keep retracted into the mouth. Such leeches are often ambush predators that lie in wait until they can strike prey with the proboscises in a spear-like fashion. Predatory leeches feed on small invertebrates such as snails, earthworms and insect larvae. The prey is usually sucked in and swallowed whole. Some Rhynchobdellida however suck the soft tissues from their prey, making them intermediate between predators and blood-suckers. Blood-sucking leeches use their anterior suckers to connect to hosts for feeding. Once attached, they use a combination of mucus and suction to stay in place while they inject hirudin into the hosts blood. In general, blood-feeding leeches are non host-specific, and do little harm to their host, dropping off after consuming a blood meal. Some marine species however remain attached until it is time to reproduce.
Leeches are segmented parasitic or predatory worms that comprise the subclass Hirudinea within the phylum Annelida. They are closely related to the oligochaetes, which include the earthworm, and like them have soft, muscular segmented bodies that can lengthen and contract. Both groups are hermaphrodites and have a clitellum, but leeches typically differ from the oligochaetes in having suckers at both ends and in having ring markings that do not correspond with their internal segmentation. The body is muscular and relatively solid, and the coelom, the spacious body cavity found in other annelids, is reduced to small channels. The majority of leeches live in freshwater habitats, while some species can be found in terrestrial or marine environments. The best-known species, such as the medicinal leech, Hirudo medicinalis, are hematophagous, attaching themselves to a host with a sucker and feeding on blood, having first secreted the peptide hirudin to prevent the blood from clotting. The jaws used to pierce the skin are replaced in other species by a proboscis which is pushed into the skin. A minority of leech species are predatory, mostly preying on small invertebrates. The eggs are enclosed in a cocoon, which in aquatic species is usually attached to an underwater surface; members of one family, Glossiphoniidae, exhibit parental care, the eggs being brooded by the parent. In terrestrial species, the cocoon is often concealed under a log, in a crevice or buried in damp soil.