Extensive clinical and imaging research has characterized the neural networks mediating the adaptive distribution of spatial attention. In everyday behavior, the distribution of attention is guided not only by extrapersonal targets but also by mental representations of their spatial layout. We used eventrelated functional magnetic resonance imaging to identify the neural system involved in directing attention to locations in arrays held as mental representations, and to compare it with the system for directing spatial attention to locations in the external world. We found that these two crucial aspects of spatial cognition are subserved by extensively overlapping networks. However, we also found that a region of right parietal cortex selectively participated in orienting attention to the extrapersonal space, whereas several frontal lobe regions selectively participated in orienting attention within on-line mental representations.