We studied the appearance of broadband oscillatory changes (ranging 2-45 Hz) induced by a cognitive task with two levels of complexity. The event-related de/synchronizations (ERD/S) in the subthalamic nucleus (STN) and in the anterior cingulate cortex (ACC) were evaluated in an executive function test. Four epilepsy surgery candidates with intracerebral electrodes implanted in the ACC and three Parkinson's disease patients with externalized deep brain stimulation electrodes implanted in the STN participated in the study. A Flanker test (FT) with visual stimuli (arrows) was performed. Subjects reacted to four types of stimuli presented on the monitor by pushing the right or left button: congruent arrows to the right or left side (simple task) and incongruent arrows to the right or left side (more difficult complex task). We explored the activation of STN and the activation of the ACC while processing the FT. Both conditions, i.e. congruent and incongruent, induced oscillatory changes in the ACC and also STN with significantly higher activation during incongruent trial. At variance with the ACC, in the STN not only the ERD beta but also the ERD alpha activity was significantly more activated by the incongruent condition. In line with our earlier studies, the STN appears to be involved in activities linked with increased cognitive load. The specificity and complexity of task-related activation of the STN might indicate the involvement of the STN in processes controlling human behaviour, e.g. in the selection and inhibition of competing alternatives.