Many complex tasks require us to flexibly switch between behavioral rules, associations, and strategies. The prefrontal cerebral cortex is thought to be critical to the performance of such behaviors, although the relative contribution of different components of this structure and associated subcortical regions are not fully understood. We used functional magnetic resonance imaging to measure brain activity during a simple task which required repeated reversals of a rule linking a colored cue and a left/right motor response. Each trial comprised three discrete events separated by variable delay periods. A colored cue instructed which response was to be executed, followed by a go signal which told the subject to execute the response and a feedback instruction which indicated whether to “hold” or “flip” the rule linking the colored cue and response. The design allowed us to determine which brain regions were recruited by the specific demands of preparing a rule contingent motor response, executing such a response, evaluating the significance of the feedback, and reconfiguring stimulus-response (SR) associations. The results indicate that an increase in neural activity occurs within the anterior cingulate gyrus under conditions in which SR associations are labile. In contrast, lateral frontal regions are activated by unlikely/unexpected perceptual events regardless of their significance for behavior. A network of subcortical structures, including the mediodorsal nucleus of the thalamus and striatum were the only regions showing activity that was exclusively correlated with the neurocognitive demands of reversing SR associations. We conclude that lateral frontal regions act to evaluate the behavioral significance of perceptual events, whereas medial frontal-thalamic circuits are involved in monitoring and reconfiguring SR associations when necessary.