Abstract : Cognitive control is defined as the function that guides action selection according to our goals and external events. In this work, we used functional magnetic resonance imaging (fMRI) to study the neural bases of cognitive control in humans. In a first study, we show that there exist three hierarchical levels of cognitive control : sensory control, exerted by the premotor cortex, selects actions according to stimuli ; contextual control, exerted by the posterior lateral prefrontal cortex (LPFC), selects sensorimotor associations (i.e., task-sets) according to the immediate context in wich stimuli occur ; episodic control, exerted by the anterior LPFC, selects task-sets and responses according to past events. In a second study, we show that sensory, contextual and episodic control are also involved in preparatory selection of actions, and engage respectively the same regions as during execution. In a third study, we show that each lateral frontal region engaged in cognitive control admits a functionnally homologous region in the parietal cortex. This property however, is not reciprocal: we reveal a specific region in the parietal cortex which appear to be involved in computing, but not selecting, the set of possible responses associated with perceived stimuli. Moreover, unlike lateral frontal regions, these parietal homologues do not show a hierarchical organisation. Thus, experimental results support a global model of cognitive control organisation in the cerebral cortex.