Individual differences in working-memory (WM) capacity predicted performance on the Stroop task in 5 experiments, indicating the importance of executive control and goal maintenance to selective attention. When the Stroop task encouraged goal neglect by including large numbers of congruent trials (RED presented in red), low WM individuals committed more errors than did high WM individuals on the rare incongruent trials (BLUE in red) that required maintaining access to the "ignore-the-word" goal for accurate responding. In contrast, in tasks with no or few congruent trials, or in high-congruency tasks that followed low-congruency tasks, WM predicted response-time interference. WM was related to latency, not accuracy, in contexts that reinforced the task goal and so minimized the difficulty of actively maintaining it. The data and a literature review suggest that Stroop interference is jointly determined by 2 mechanisms, goal maintenance and competition resolution, and that the dominance of each depends on WM capacity, as well as the task set induced by current and previous contexts. (PsycINFO Database Record (c) 2012 APA, all rights reserved)