To understand the biochemical signals regulated by neural activity, it is necessary to measure protein-protein interactions and enzymatic activity in neuronal microcompartments such as axons, dendrites and their spines. We combined two-photon excitation laser scanning with fluorescence lifetime imaging to measure fluorescence resonance energy transfer at high resolutions in brain slices. We also developed sensitive fluorescent protein-based sensors for the activation of the small GTPase protein Ras with slow (FRas) and fast (FRas-F) kinetics. Using FRas-F, we found in CA1 hippocampal neurons that trains of back-propagating action potentials rapidly and reversibly activated Ras in dendrites and spines. The relationship between firing rate and Ras activation was highly nonlinear (Hill coefficient approximately 5). This steep dependence was caused by a highly cooperative interaction between calcium ions (Ca(2+)) and Ras activators. The Ras pathway therefore functions as a supersensitive threshold detector for neural activity and Ca(2+) concentration.