The deployment of visual attention can be strongly modulated by stimuli matching the contents of working memory (WM), even when WM contents are detrimental to performance and salient bottom-up cues define the critical target [D. Soto et al. (2006)Vision Research, 46, 1010–1018]. Here we investigated the electrophysiological correlates of this early guidance of attention by WM in humans. Observers were presented with a prime to either identify or hold in memory. Subsequently, they had to search for a target line amongst different distractor lines. Each line was embedded within one of four objects and one of the distractor objects could match the stimulus held in WM. Behavioural data showed that performance was more strongly affected by the prime when it was held in memory than when it was merely identified. An electrophysiological measure of the efficiency of target selection (the N2pc) was also affected by the match between the item in WM and the location of the target in the search task. The N2pc was enhanced when the target fell in the same visual field as the re-presented (invalid) prime, compared with when the prime did not reappear in the search display (on neutral trials) and when the prime was contralateral to the target. Merely identifying the prime produced no effect on the N2pc component. The evidence suggests that WM modulates competitive interactions between the items in the visual field to determine the efficiency of target selection.