Increasing demands for conflict detection and for allocation of attentional resources increase the need for attentional control. While prior evidence suggests that different cortical regions are preferentially engaged by these two attentional processes, the effect of increasing demand for conflict detection and/or allocation of attentional resources has been relatively unexplored. We designed a novel task (the ‘variable attentional control’– VAC – task) that varies the demand for attentional control by increasing conflict detection and allocation of attentional resources within the same stimuli. We studied 34 subjects who underwent event-related functional magnetic resonance imaging while performing the VAC task. Increasing demand for attentional control, as reflected by longer reaction time and reduced accuracy, was associated with greater activation in the dorsolateral prefrontal cortex, parietal cortex and dorsal cingulate. Furthermore, an increase in conflict detection was associated with greater dorsal cingulate activity, whereas an increase in demand for allocation of attentional resources implied greater activation in the dorsolateral prefrontal and parietal cortices. In essence, in addition to allowing the exploration of the overall effects of increasing demand for attentional control, our novel task also allowed parsing of the neural components of attentional control into those related to allocation of attentional resources and those related to conflict detection.