The proleg withdrawal reflex in the caterpillar Manduca sexta is a robust, well-characterized system for investigating the integration of sensory information with centrally patterned behavior. The reflex is evoked by stimulating mechanosensory hairs--planta hairs--located at the tip of each proleg. We studied the expression of this reflex by combining video recordings and electromyographic recordings from the main retractor muscles of the proleg, the principal and accessory planta retractor muscles. In intact animals, the nature of the response depended on the motor context of the animal. Animals which were standing quietly showed great variability in both the kinematic properties of proleg withdrawal, and the corresponding muscle electrical activity. Animals which were hanging upside down from a wooden dowel exhibited a much faster reflex, with retraction of the proleg occurring slightly faster than in standing animals, but re-extension of the proleg to the substrate being considerably faster. In crawling animals, expression of the reflex depended on the phase of the crawling cycle during which stimulation occurred. The reflex in a given proleg was suppressed during stance phase of that proleg. During swing phase, however, planta hair stimulation evoked proleg withdrawal, resulting in an assistance reflex. In contrast. isolated abdomens showed much less variability in the reflex. A comparison of the relationship between retractor muscle activity and the resulting proleg movement showed significant correlations between both the duration of activity and the number of muscle spikes, and the size of the associated proleg withdrawal. This is a promising system in which to investigate how central neuronal circuits accomplish context-dependency of motor behavior.