The sensory innervation of the stomach and pancreas has been identified by retrograde tracing using the fluorescent dye True Blue (Illing, Gross-Umstadt, Federal Republic of Germany), coupled with the immunohistochemical localization of substance P. Labeled cells were visualized in spinal ganglia, nodose ganglia, celiac ganglion, and dorsal motor nucleus of the vagus after injection of True Blue into both stomach and pancreas. Substance P immunoreactivity was found in 35%-50% of gastric spinal afferent neurons and in approximately 15% of pancreatic spinal afferents. In rats treated at birth with the sensory neurotoxin capsaicin there was a reduction of about 70% in True Blue-labeled cells in the spinal and nodose ganglia, and virtually complete loss of substance P in these ganglia. There was also a marked depletion of substance P-immunoreactive fibers in the pancreas, and in the submucosa of the stomach. The results suggest that the substance P-containing spinal afferents that project to the gastric submucosa are an important component of the gastric sensory innervation.