Functional imaging studies have identified a matrix of structures in the brain that respond to noxious stimuli. Within this matrix, a division of function between sensory-discriminative and affective responses has so far been demonstrated by manipulating either pain intensity or unpleasantness under hypnosis in two different normal volunteer groups studied on separate occasions. Our study used positron emission tomography (PET) to demonstrate this division of function under more natural conditions in a healthy group of volunteers, using a CO2 laser to provide nociceptive stimuli that selectively activate A-delta and C-fibres without contamination by touch sensations. We measured the differential cerebral responses to noxious and innocuous laser stimuli during conditions of selective attention to either the unpleasantness or location of the stimuli. Attention to location increased responses in the contralateral (right) primary somatosensory and inferior parietal cortices. This result implies that these components of the lateral pain system are concerned mainly with the localization of pain. In contrast, attention to unpleasantness increased responses in bilateral perigenual cingulate and orbitofrontal cortices, contralateral (right) amygdala, ipsilateral (left) hypothalamus, posterior insula, M1 and frontal pole. These areas comprise key components of the medial pain and neuroendocrine systems and the results suggest that they have a role in the affective response to pain. Our results indicate the importance of attentional effects on the pattern of nociceptive processing in the brain. They also provide the first clear demonstration, within a single experiment, of a major division of function within the neural pain matrix.