Neuromodulation is often thought to have a static, gain-setting function in neural circuits. Here we report a counter example: the neuromodulatory effect of a serotonergic neuron is dependent on the interval between its spikes and those of the neuron being modulated. The serotonergic dorsal swim interneurons (DSIs) are members of the escape swim central pattern generator (CPG) in the mollusk Tritonia diomedea. DSI spike trains heterosynaptically enhanced synaptic potentials evoked by another CPG neuron, ventral swim interneuron B (VSI-B), when VSI-B action potentials occurred within 10 sec of a DSI spike train; however, if VSI-B was stimulated 20-120 sec after DSI, then the amplitude of VSI-B synaptic potentials decreased. Consistent with this, VSI-B-evoked synaptic currents exhibited a temporally biphasic and bidirectional change in amplitude after DSI stimulation. Both the DSI-evoked enhancement and decrement were occluded by serotonin and blocked by the serotonin receptor antagonist methysergide, suggesting that both phases are mediated by serotonin. In most preparations, however, bath-applied serotonin caused only a sustained enhancement of VSI-B synaptic strength. The heterosynaptic modulation interacted with short-term homosynaptic plasticity: DSI-evoked depression was offset by VSI-B homosynaptic facilitation. This caused a complicated temporal pattern of neuromodulation when DSI and VSI-B were stimulated to fire in alternating bursts to mimic the natural motor pattern: DSI strongly enhanced summated VSI-B synaptic potentials and suppressed single synaptic potentials after the cessation of the artificial motor pattern. Thus, spike timing-dependent serotonergic neuromodulatory actions can impart temporal information that may be relevant to the operation of the CPG.