In many sensory modalities, afferent processing is dynamically modulated by attention and this modulation produces altered sensory experiences. Attention is able to alter perceived pain, but the mechanisms involved in this modulation have not been elucidated. To determine whether attention alters spatial integration of nociceptive information, subjects were recruited to evaluate pain from pairs of noxious/innocuous thermal stimuli during different spatial attentional tasks. Divided attention was able to abolish spatial summation and produce inhibition of pain. In contrast, directed attention enhanced pain intensity by partially integrating both stimuli. This dynamic modulation of spatial integration indicates that attention alters spatial dimensions of afferent nociceptive processing to optimize the perceptual response to input from a particular body region or stimulus feature. This dynamic spatial tuning of nociceptive processing provides a new conceptual insight into the functional significance of endogenous pain inhibitory and facilitatory mechanisms.