We investigated neural correlates of human visual orienting using event-related functional nqagnetic resonance imaging (fMRI). When subjects voluntarily directed attention to a peripheral location, we recorded robust and sustained signals uniquely from the intraparietal sulcus (IPs) and superior frontal cortex (near the frontal eye field, FEF). In the ventral IPs and FEF only, the blood oxygen level dependent signal was modulated by the direction of attention. The IPs and FEF also maintained the most sustained level of activation during a 7-sec delay, when subjects maintained attention at the peripheral cued location (working memory). Therefore, the IPs and FEF form a dorsal network that controls the endogenous allocation and maintenance of visuospatial attention. A separate right hemisphere network was activated by the detection of targets at unattended locations. Activation was largely independent of the target's location (visual field). This network included among other regions the right temporo-parietal junction and the inferior frontal gyrus. We propose that this cortical network is important for reorienting to sensory events.