Our eyes receive more visual information than the brain can consciously process. Attentional mechanisms overcome this limited processing capacity by prioritising information that is currently relevant for behaviour. Attention can be allocated efficiently in a cluttered visual scene by exploiting stored representations of regularities in the environment. In the laboratory, this has been demonstrated in the spatial contextual cueing paradigm. Spatial contextual cueing operates when observers are repeatedly exposed to a visual array, and they learn contextual information from those exposures that guides their search behaviour. In this thesis I investigated whether spatial contextual cueing draws on spatial working memory and, if so, what role working memory plays in the acquisition and expression of contextual knowledge gained during visual search. In Experiment 1 I tested contextual cueing under a dual-task condition, which comprised a visual search task and a spatial working-memory task. I found no evidence of contextual cueing for repeated search arrays learned by participants under working-memory load. In Experiment 2, I addressed the possibility that participants in Experiment 1 acquired contextual information from the repeat search arrays, but that the dualtask condition prevented the expression of that learning. I tested that possibility by separating the initial training phase, during which participants performed the search task under either no working-memory load or high working-memory load, from a subsequent testing phase in which participants performed only the search task. In contrast to the results of Experiment 1, when participants were tested under the single-task condition the contextual cueing benefit was unaffected by whether they learned the repeated arrays under working-memory load or no working-memory load. These results suggest that participants acquired contextual information from the repeat search arrays under working-memory load, though they remained unable to express that information under dual-task conditions. Thus, spatial working-memory load affects the expression but not the acquisition of contextual knowledge.