Objectives: Instructions to avoid an action may increase the tendency to engage in the action (ironic effects) or cause an undesirable increase in the opposing action (overcompensation). The aim of the study was to examine the relationship between gaze behavior and performance in a golf putting task when these kinds of unwanted effects occur. Methods: Twenty-seven participants performed an indoor golf putting task with instructions to land the ball on the hole (neutral instructions), land the ball on the hole but avoid putting too short and land the ball on the hole but avoid putting too long. Order of instruction was randomized and both gaze behavior and putting performance were assessed. Results: When participants gazed for longer at a specific area (in front, behind or at the hole) the ball was more likely to land in that area. Subsequent analyses confirmed a tight relationship between gaze behavior and putting performance when overcompensation occurred. For ironic effects such a tight relationship was only found when participants were instructed to avoid putting too short, but not when participants were instructed to avoid putting too long. Conclusions: Overall the results make clear that changes in (visual) attention play a key role in unwanted effects. Consequences of the results for Wegner's [(1994). Ironic processes of mental control. Psychological Review, 101, 34-52] theory of ironic processes are discussed. © 2009 Elsevier Ltd. All rights reserved.