The Ca(2+)-dependent slow afterhyperpolarization (AHP) is an important determinant of neuronal excitability. Although it is established that modest changes in extracellular pH (pH(o)) modulate the slow AHP, the relative contributions of changes in the priming Ca(2+) signal and intracellular pH (pH(i)) to this effect remain poorly defined. To gain a better understanding of the modulation of the slow AHP by changes in pH(o), we performed simultaneous recordings of intracellular free calcium concentration ([Ca(2+)](i)), pH(i), and the slow AHP in cultured rat hippocampal neurons coloaded with the Ca(2+)- and pH-sensitive fluorophores fura-2 and SNARF-5F, respectively, and whole cell patch-clamped using the perforated patch technique. Decreasing pH(o) from 7.2 to 6.5 lowered pH(i), reduced the magnitude of depolarization-evoked [Ca(2+)](i) transients, and inhibited the subsequent slow AHP; opposite effects were observed when pH(o) was increased from 7.2 to 7.5. Although decreases and increases in pH(i) (at a constant pH(o)) reduced and augmented, respectively, the slow AHP in the absence of marked changes in preceding [Ca(2+)](i) transients, the inhibition of the slow AHP by decreases in pH(o) was correlated with low pH(o)-dependent reductions in [Ca(2+)](i) transients rather than the decreases in pH(i) that accompanied the decreases in pH(o). In contrast, high pH(o)-induced increases in the slow AHP were correlated with the accompanying increases in pH(i) rather than high pH(o)-dependent increases in [Ca(2+)](i) transients. The results indicate that changes in pH(o) modulate the slow AHP in a manner that depends on the direction of the pH(o) change and substantiate a role for changes in pH(i) in modulating the slow AHP during changes in pH(o).