Single cells were recorded from cortical area V4 of two rhesus monkeys (Macaca mulatta) trained on a visual discrimination task with two levels of difficulty. Behavioral evidence indicated that the monkeys' discriminative abilities improved when the task was made more difficult. Correspondingly, neuronal responses to stimuli became larger and more selective in the difficult task. A control experiment demonstrated that changes in general arousal could not account for the effects of task difficulty on neuronal responses. It is concluded that increasing the amount of attention directed toward a stimulus can enhance the responsiveness and selectivity of the neurons that process it.