We investigated the role played by the cephalic nervous system in the control of swimming activity in the leech, Hirudo medicinalis, by comparing swimming activity in isolated leech nerve cords that included the head ganglia (supra- and subesophageal ganglia) with swimming activity in nerve cords from which these ganglia were removed. We found that the presence of these cephalic ganglia had an inhibitory influence on the reliability with which stimulation of peripheral (DP) nerves and intracellular stimulation of swim-initiating neurons initiated and maintained swimming activity. In addition, swimming activity recorded from both oscillator and motor neurons in preparations that included head ganglia frequently exhibited irregular bursting patterns consisting of missed, weak, or sustained bursts. Removal of the two head ganglia as well as the first segmental ganglion eliminated this irregular activity pattern. We also identified a pair of rhythmically active interneurons, SRN1, in the subesophageal ganglion that, when depolarized, could reset the swimming rhythm. Thus the cephalic ganglia and first segmental ganglion of the leech nerve cord are capable of exerting a tonic inhibitory influence as well as a modulatory effect on swimming activity in the segmental nerve cord.