The peptide neurotransmitter substance P modulates sensitivity to pain by activating the neurokinin-1 (NK-1) receptor, which is expressed by discrete populations of neurons throughout the central nervous system. Substance P is synthesized by small-diameter sensory `pain' fibres, and release of the peptide into the dorsal horn of the spinal cord following intense peripheral stimulation promotes central hyperexcitability and increased sensitivity to pain. However, despite the availability of specific NK-1 antagonists, the function of substance P in the perception of pain remains unclear. Here we investigate the effect of disrupting the gene encoding the NK-1 receptor in mice. We found that the mutant mice were healthy and fertile, but the characteristic amplification (`wind up') and intensity coding of nociceptive reflexes was absent. Although substance P did not mediate the signalling of acute pain or hyperalgesia, it was essential for the full development of stress-induced analgesia and for an aggressive response to territorial challenge, demonstrating that the peptide plays an unexpected role in the adaptive response to stress.