In the present study participants searched for an onset target or a color singleton target and were required to execute a saccade toward (prosaccade) or away (antisaccade) from the search target. The results showed that participants often made erroneous saccades toward the onset or color singleton when they were the search target in the antisaccade condition, but not when they were presented as task-irrelevant distractors. This suggests that task-relevance plays a critical role in the production of erroneous prosaccades and provides evidence that these saccades are not completely reflexive. Furthermore, it was found that the antisaccade cost (latency difference between prosaccades and antisaccades) was greater for color singleton search targets than for onset search targets. The present findings have implications for our understanding of the processes involved in the programming of antisaccades and the causes of erroneous prosaccades.