Turning attention towards or away from a painful heat stimulus is known to modify both the subjective intensity of pain and the cortical evoked potentials to noxious stimuli. Using PET, we investigated in 12 volunteers whether pain-related regional cerebral blood flow (rCBF) changes were also modulated by attention. High (mean 46.6 degrees C) or low (mean 39 degrees C) intensity thermal stimuli were applied to the hand under three attentional conditions: (i) attention directed towards the stimuli, (ii) attention diverted from the stimuli, and (iii) no task. Only the insular/second somatosensory cortices were found to respond whatever the attentional context and might, therefore, subserve the sensory-discriminative dimension of pain (intensity coding). In parallel, other rCBF changes previously described as 'pain-related' appeared to depend essentially on the attentional context. Attention to the thermal stimulus involved a large network which was primarily right-sided, including prefrontal, posterior parietal, anterior cingulate cortices and thalamus. Anterior cingulate activity was not found to pertain to the intensity coding network but rather to the attentional neural activity triggered by pain. The attentional network disclosed in this study could be further subdivided into a non-specific arousal component, involving thalamic and upper brainstem regions, and a selective attention and orientating component including prefrontal, posterior parietal and cingulate cortices. A further effect observed in response to high intensity stimuli was a rCBF decrease within the somatosensory cortex ipsilateral to stimulation, which was considered to reflect contrast enhancing and/or anticipation processes. Attentional processes could possibly explain part of the variability observed in previous PET reports and should therefore be considered in further studies on pain in both normal subjects and patients with chronic pain.