In the present high-resolution electroencephalographic (EEG) study, an omitted-stimulus paradigm induced a strong expectancy for a predictable painful stimulation (nonpainful in the control condition). During the expectancy of pain, concurrent cognitive demands were superimposed. The aim was to investigate the effects on primary sensorimotor and central midline areas of the competition among concurrent attentional processes related to cognition and pain expectancy, as indexed by behavioral performance and EEG data. A main issue was whether cognitive performance decreases, due to a re-allocation of attentional resources on primary sensorimotor and midline areas for the anticipation of pain. Behavioral results showed no differences in the cognitive (working memory) performance during the expectancy of nonpainful versus painful stimulations. In parallel, anticipatory event-related potentials (ERPs) were negligible in line with a low emotional reactivity/alertness as revealed by heart rate deceleration (HRD), skin conductance response (SCR), and low-band (6-10Hz) alpha EEG oscillations. In contrast, high-band alpha EEG oscillations (10-12Hz) over the contralateral primary sensorimotor cortex decreased more during the expectancy of painful compared to nonpainful stimuli, in line with an increased anticipatory preparation of the somatosensory channel. These findings provide further evidence on the fact that attentional processes at the basis of cognition can be defended by the anticipation of pain, at least when the incoming painful stimuli are repetitive and predictable. This happens even if the brain increases preparatory processes of the specific sensory channel to be targeted by the painful stimulus.