Many neurons in extrastriate visual cortex have large receptive fields, and this may lead to significant computational problems whenever multiple stimuli fall within a single field. Previous studies have suggested that when multiple stimuli fall within a cell's receptive field, they compete for the cell's response in a manner that can be biased in favor of attended stimuli. In the present study we examined this role of attention in areas V1, V2, and V4 of macaque monkeys with the use of a behavioral paradigm in which attention was directed to one of two stimulus locations. When two stimuli were presented simultaneously inside the cell's receptive field (which could be accomplished only in areas V2 and V4), we found that the cell's response was strongly influenced by which of the two stimuli was attended. The size of this attention effect was reduced when the attended and ignored stimuli were presented sequentially rather than simultaneously. In addition, the effects became very weak and inconsistent in these areas when only one of the two stimuli was located inside the receptive field. Attention thus modulated sensory responses primarily when two or more simultaneous stimuli competed for access to a neuron's receptive field. As in areas V2 and V4, attention did not modulate sensory responses in area V1 when only a single stimulus was inside the receptive field. In addition, the small receptive fields in this area precluded the simultaneous presentation of attended and ignored stimuli inside the receptive field, making it impossible to determine whether attention effects would be observed under the conditions that led to consistent attention effects in areas V2 and V4. Spontaneous firing rates in areas V2 and V4 were found to be 30-40% higher when attention was directed inside rather than outside the receptive field, even when no stimulus was present in the receptive field. Spontaneous firing rates also varied according to the particular location within the receptive field that was attended. These shifts in spontaneous activity may reflect a top-down signal that biases responses in favor of stimuli at the attended location.