Visual search is speeded when the target is repeated from trial to trial compared to when it changes, suggesting that selective attention learns from previous events. Such intertrial effects are stronger when there is more competition for selection, for example in ambiguous displays where the target is accompanied by a salient distractor. Here we investigate whether this is because the competition strengthens the learning itself, or because it allows for a learned representation to exert a greater effect. The results point to the latter. Observers looked for a colour-defined target that could repeat or change from trial to trial. A salient distractor could be present on the current trial, the previous trial, both, or neither. Intertrial effects were greater when a distractor was present on the current trial, suggesting that a primed target representation is more beneficial under conditions of competition. In contrast, distractor presence on the previous trial had no effects whatsoever, indicating that the learning process itself is not affected by competition. This suggests that the source of the learning resides at postselection stages, whereas the effects may occur at the perceptual level. © 2012 Copyright Psychology Press Ltd.