The dominant models of learning and memory, such as Hebbian plasticity, propose that experiences are transformed into memories through input-specific synaptic plasticity at the time of learning. However, synaptic plasticity is neither strictly input specific nor restricted to the time of its induction. The impact of such forms of non-Hebbian plasticity on memory has been difficult to test, hence poorly understood. Here, we demonstrate that synaptic manipulations can deviate from the Hebbian model of learning, yet produce a lasting memory. First, we established an associative conditioning protocol where optogenetic stimulation of sensory thalamic input to the amygdala was paired with a footshock, but no detectable memory was formed. However, when the same input was potentiated minutes before or after, or even 24 hours later, the associative experience was converted to a lasting memory. Importantly, potentiating an independent input to the amygdala minutes but not 24 hours after the pairing produced a lasting memory. Thus, our findings suggest that the process of transformation of a transient experience into a memory is neither restricted to the time of the experience nor to the synapses triggered by it; instead, it can be influenced by past and future events.