Abstract Practicing a visual task commonly results in improved performance. Often the improvement does not transfer well to a new retinal location, suggesting that it is mediated by changes occurring in early visual cortex, and indeed neuroimaging and neurophysiological studies both demonstrate that perceptual learning is associated with altered activity in visual cortex. Theoretical treatments tend to invoke neuroplasticity that refines early sensory processing. An alternative possibility is that performance is improved because of an altered attentional strategy and that the changes in early visual areas reflect locally altered top-down attentional modulation. To test this idea, we have used functional MRI to examine changes in attentional modulation in visual cortex while participants learn an orientation discrimination task. By examining activity in visual cortex during the preparatory period when the participant has been cued to attend to an upcoming stimulus, we isolated the top-down modulatory signal received by the visual cortex. We show that this signal changes as learning progresses, possibly reflecting gradual automation of the task. By manipulating task difficulty, we show that the change mirrors performance, occurring most quickly for easier stimuli. The effects were seen only at the retinal locus of the stimulus, ruling out a generalized change in alertness. The results suggest that spatial attention changes during perceptual learning and that this may account for some of the concomitant changes seen in visual cortex.