The crab Carcinus maenas walks laterally; moreover, as soon as leg contact with the support is lost, it starts swimming. In free-moving animals, discharges from individual force- and contact-mechanoreceptors located in the terminal segment of the last pair of walking legs have been recorded. These receptors are active during the stance phase of walking and remain silent during swimming. Selective electrical stimulation of their afferent fibers during swimming inhibits this behaviour. The possible role of such sensory information in selecting different motor patterns is discussed.