Both electrical stimulation and injection of morphine into the midbrain periaqueductal gray (PAG) produce analgesia in the rat. There is evidence that this analgesic effect is mediated by a descending system that involves nucleus raphe magnus (NRM) and adjacent reticular formation. In the studies reported here, the activity of the cells in the PAG was increased by microinjection of glutamate in this area and its effect on both the activity of single cells in the NRM and on a flexion reflex elicited by noxious heat was measured. It is shown that an increase in the firing rate of the cells in the PAG is associated with a raised threshold for flexion and is also correlated with an increase in the firing rate of a majority of the cells in the NRM. This effect on the flexion reflex can be abolished by (a) lesion of the nucleus raphe magnus and a small area of the reticular formation surrounding this nucleus and (b) by nalazone 20 min after its i.v. injection. It is concluded that there is an excitatory connection between the periaqueductal gray and the nucleus raphe magnus and that activation of this system can cause analgesia.