When multiple objects are present in a visual scene, they compete for cortical processing in the visual system; selective attention biases this competition so that representations of behaviorally relevant objects enter awareness and irrelevant objects do not. Deployments of selective attention can be voluntary (e.g., shift or attention to a target's expected spatial location) or stimulus driven (e.g., capture of attention by a target-defining feature such as color). Here we use functional magnetic resonance imaging to show that both of these factors induce spatially selective attentional modulations within regions of human occipital, parietal, and frontal cortex. In addition, the voluntary attentional modulations are temporally sustained, indicating that activity in these regions dynamically tracks the locus of attention. These data show that a convolution of factors, including prior knowledge of location and target-defining features, determines the relative competitive advantage of visual stimuli within multiple stages of the visual system.