Switching between tasks that overlap in perceptual and response characteristics is assumed to rely upon the maintenance of task representations in prefrontal cortex (PFC). However, task-switching studies demonstrate "switch costs," even when there is sufficient time to prepare for a new task. These costs suggest that task-switching performance reflects a complex interplay between priming and the updating and maintenance of task representations. We describe a computational model in which this interaction is made explicit and linked to the dynamics of PFC. Simulation results account for a variety of empirical phenomena and predict a double dissociation in lateral PFC that was subsequently identified. © 2006 Elsevier B.V. All rights reserved.