Many psychiatric symptoms have been linked to threat-related perception and learning processes. In addition, however, there may also be mechanisms for balancing effectively between threat- and reward-related behaviors and these may also vary between individuals. We investigated neural activity associated with spontaneous switching between foraging for rewards and vigilance for threats with 7T fMRI. In a virtual naturalistic environment, participants freely switched between the two modes of behavior. Switching was driven by estimates of likelihood of threat and reward. Both tracking of threat and switching to vigilance were associated with specific but distributed patterns of activity spanning habenula, dorsal raphe nucleus (DRN), anterior cingulate cortex, and anterior insula cortex. Distinct distributed patterns heralded returns to reward-oriented behavior. Individual variation in DRN activity reflected individual variation in vigilance. All activity patterns were replicated in an initially held-out portion of data.