Background. Pain is known to negatively impact attention, but its influence on more complex cognitive abilities, such as logical reasoning, remains inconsistent. This may be due to compensatory mechanisms (e.g., investing additional resources), which might not be detectable at the behavioral level but can be observed through psychophysiological measures. In this study, we investigated whether experimentally induced pain affects logical reasoning and underlying attentional mechanisms, using both behavioral and electroencephalographic (EEG) measures. Methods. A total of 98 female participants were divided into a pain-free control group (N = 47) and a pain group (N = 51). Both groups completed the Advanced Progressive Matrices (APM) task, with EEG recordings capturing task-related power (TRP) changes in the upper alpha frequency band (10–12 Hz). We used a mixed design where all participants completed half of the APM task in a pain-free state (control condition); the second half was completed under pain induction by the pain group but not the pain-free group (experimental condition). Results. Logical reasoning performance, as measured by APM scores and response times, declined during the experimental condition, compared to the control condition for both groups, indicating that the second part of the APM was more difficult than the first part. However, no significant differences were found between the pain and pain-free groups, suggesting that pain did not impair cognitive performance at the behavioral level. In contrast, EEG measures revealed significant differences in upper alpha band power, particularly at fronto-central sites. In the pain group, the decrease in TRP during the experimental condition was significantly smaller compared to both the control condition and the pain-free group. Conclusions. Pain did not impair task performance at the behavioral level but reduced attentional resources, as reflected by changes in upper alpha band activity. This underscores the importance of incorporating more sensitive psychophysiological measures alongside behavioral measures to better understand the impact of pain on cognitive processes.