The vagus nerve modulates nociception by a mechanism dependent upon gonadal hormones and the adrenal medulla. In the present study we tested the hypothesis that this modulation is dynamically controlled by physiological stimulation of structures innervated by the subdiaphragmatic vagus. Specifically, food deprivation (fasting) was employed to increase activity in the subdiaphragmatic vagus, and the experiments were performed mainly in female rats because our previous observations suggested that baseline activity in the pathway is lower in females than in males. Consistent with the hypothesis, after a 48-h fast, female rats exhibited increased nociceptive behavior in the formalin test. In contrast, fasting had no effect on formalin-evoked nociceptive behavior in male rats. The fasting-induced effect on nociception appears to be mediated by the vagus nerve since it is prevented by subdiaphragmatic vagotomy. Also similar to the previously characterized vagus-mediated modulation, the effect of fasting in the female is blocked by gonadectomy or adrenal medullectomy, and hormone replacement with 17beta-estradiol in gonadectomized female rats restored the effect of fasting. Decreased glucose metabolism apparently does not play a significant role in the effect of fasting on nociception, since the effect was unchanged when 5% glucose was provided in the drinking water throughout the fasting period. On the other hand, increasing the bulk content of the stomach (without providing nutrients) by infusion of petrolatum significantly attenuated the effect of fasting during the interphase period of the formalin response, suggesting that decreased gut distention, and possibly motility, are important in fasting-induced enhancement of nociception. These results indicate that fasting is a physiological activator of the vagus-mediated pain modulation pathway. This suggests the possibility that, especially in females, natural periodic changes in gut distention and motility may control an ongoing vagus-mediated adjustment in the organism's nociceptive sensitivity.