Attention can facilitate visual processing, emphasizing specific locations and highlighting stimuli containing specific features. To dissociate the mechanisms of spatial and feature-based attention, we compared the time course of visually evoked responses under different attention conditions. We recorded from single neurons in area V4 during a delayed match-to-sample task that controlled both spatial and feature-based attention. Neuronal responses increased when spatial attention was directed toward the receptive field and were modulated by the identity of the target of feature-based attention. Modulation by spatial attention was weaker during the early portion of the visual response and stronger during the later portion of the response. In contrast, modulation by feature-based attention was relatively constant throughout the response. It appears that stimulus onset transients disrupt spatial attention, but not feature attention. We conclude that spatial attention reflects a combination of stimulus-driven and goal-driven processes, while feature-based attention is purely goal driven.