Executive functions such as task-set switching are thought to depend on the frontal cortex. However, more precision is required in identifying which components of such high-level processes relate to which, if any, subregions of the brain. In a recent study of 19 patients with focal right frontal (RF) lesions and 17 with left frontal (LF) lesions, we found that response inhibition, as measured by the stop-signal task, was specifically disrupted by damage to the right inferior frontal gyrus (IFG). The present study examined task-switching performance in this same group of patients and in matched controls on the grounds that inhibitory mechanisms may also be required to switch task-set. Both RF and LF patients showed significantly larger switch costs (the difference, in reaction time and errors, between changing tasks and repeating the same task) than controls, but apparently for different reasons. For RF patients, a part of the switch deficit could be accounted for by impaired inhibition of inappropriate responses or task-sets triggered by stimuli, and one measure of the switch cost correlated reliably with damage to the IFG, specifically the pars opercularis (POp). For LF patients, a part of the switch deficit may have arisen from weak top-down control of task-set. The degree of top-down control correlated reliably with the extent of damage to the left middle frontal gyrus (MFG). This study localizes two components of the complex task-switching process (inhibition of task-sets and/or responses and top-down control of task-set) to the right IFG/POp and the left MFG respectively.