It is well known that the basal ganglia are involved in switching between movement sequences. Here we test the hypothesis that this contribution is an instance of a more general role of the basal ganglia in selecting actions that deviate from the context defined by the recent motor history, even when there is no sequential structure to learn or implement. We investigated the effect of striatal dopamine depletion [in Parkinson's disease (PD)] on the ability to switch between independent action plans. PD patients with markedly lateralized signs performed a hand laterality judgment task that involved action selection of their most and least affected hand. Trials where patients selected the same (repeat) or the alternative (switch) hand as in a previous trial were compared, and this was done separately for the most and least affected hand. Behaviorally, PD patients showed switch-costs that were specific to the most affected hand and that increased with disease severity. Functional magnetic resonance imaging (fMRI) showed that this behavioral effect was related to the state of the frontostriatal system: as disease severity increased, contributions of the basal ganglia to the selection process and their effective connectivity with the medial frontal cortex (MFC) decreased, whereas involvement of the MFC increased. We conclude that the basal ganglia are important for rapidly switching toward novel motor plans even when there is no sequential structure to learn or implement. The enhanced MFC activity may result either from reduced focusing abilities of the basal ganglia or from compensatory processes.