Momentary lapses in attention frequently impair goal-directed behavior, sometimes with serious consequences. Nevertheless, we lack an integrated view of the brain mechanisms underlying such lapses. By investigating trial-by-trial relationships between brain activity and response time in humans, we determined that attentional lapses begin with reduced prestimulus activity in anterior cingulate and right prefrontal regions involved in controlling attention. Less efficient stimulus processing during attentional lapses was also characterized by less deactivation of a 'default-mode' network, reduced stimulus-evoked sensory activity, and increased activity in widespread regions of frontal and parietal cortex. Finally, consistent with a mechanism for recovering from attentional lapses, increased stimulus-evoked activity in the right inferior frontal gyrus and the right temporal-parietal junction predicted better performance on the next trial. Our findings provide a new, system-wide understanding of the patterns of brain activity that are associated with brief attentional lapses, which informs both theoretical and clinical models of goal-directed behavior. © 2006 Nature Publishing Group.