Using spike-timing-dependent plasticity (STDP) protocols that consist of pairing an EPSP and a postsynaptic backpropagating action potential (BAP), we investigated the contribution of the changes in EPSP waveform induced by the slow Ca2+-dependent K+-mediated afterhyperpolarization (sAHP) in the regulation of long-term potentiation (LTP). The "temporal window" between Schaffer collateral EPSPs and BAPs in CA1 pyramidal neurons required to induce LTP was narrowed by a reduction of the amplitude and decay time constant of the EPSP, which could be reversed with cyclothiazide. The EPSP changes were caused by the increased conductance induced by activation of the sAHP. Therefore, the EPSP waveform and its regulation by the sAHP are central in determining the duration of the temporal window for STDP, thus providing a possible dynamic regulatory mechanism for the encoding of cognitive processes.