Imaging studies indicate that experimental pain is processed in multiple cortical areas which are often characterized as a network. However, the functional connectivity within the network and the other properties of the network is poorly understood. Substantial evidence demonstrates that synchronous oscillations between two cortical areas may indicate functional connectivity between those areas. We test the hypothesis that cortical areas with pain-related activity are functionally connected during attention to a painful stimulus. We stimulated with a painful, cutaneous, laser stimulus and recorded the response directly from the cortical surface (electrocorticography – ECoG) over primary somatosensory (SI), parasylvian (PS), and medial frontal (MF) cortex through subdural electrodes implanted for treatment of epilepsy. The results demonstrate synchrony of ECoGs between cortical structures receiving input from nociceptors, as indicated by the occurrence of laser-evoked potentials (LEPs) and/or event-related desynchronization (ERD). Prior to the stimulus, directed attention to the painful stimulus consistently increased the degree of synchrony between SI and PS regions, as the subject anticipated the stimulus. After the laser stimulus, directed attention to the painful stimulus consistently increased the degree of synchrony between SI and MF cortex, as the subject responded by counting the stimulus. Therefore, attention to painful stimuli always enhanced synchrony between cortical pain-related structures. The pattern of this synchrony changed as the patient switched tasks from anticipation of the stimulus to counting the stimulus. These results are the first compelling evidence of pain networks characterized by rapidly switching, task-specific functional connectivity.