Analgesia induced by stressful and painful stimuli is an adaptive response during life-threatening situations. There is no evidence linking the mechanisms underlying them, while the former depends on the activation of stress-related brain pathways, the second depends on opioidergic mechanisms in the nucleus accumbens and on nicotinic cholinergic mechanisms in the rostral ventromedial medulla. In this study, we hypothesized that stress-induced analgesia is also dependent on opioidergic mechanisms in the nucleus accumbens and on nicotinic cholinergic mechanisms in the rostral ventromedial medulla. We used immobilization, a classical procedure to induce acute stress, and evaluated its ability to decrease the nociceptive responses induced either by carrageenan or by formalin in rats. Immobilization stress significantly decreased either carrageenan-induced hyperalgesia or formalin-induced tonic nociception in a time-dependent manner. This stress-induced analgesia is similar to pain-induced analgesia, as revealed by contrasting the antinociceptive effect induced by immobilization and by a forepaw injection of capsaicin. The administration of a µ-opioid receptor antagonist (CTOP, 0.5 µg) into the nucleus accumbens, as well as that of a nicotinic cholinergic receptor antagonist (mecamylamine, 0.6 µg) into the rostral ventromedial medulla, blocked immobilization stress-induced analgesia in both pain models. These results demonstrate that supraspinal mechanisms which are known to mediate pain-induced analgesia also mediate stress-induced analgesia. Therefore both forms of analgesia have overlapping mechanisms, probably recruited in response to the perception of danger.