A similar neural ensemble participates in the encoding of two distinct memories, resulting in the recall of one memory increasing the likelihood of recalling the other, but only if those memories occur very closely in time—within a day rather than across a week. This paper tests and provides support for the emerging hypothesis that two distinct memories formed close in time may be linked, such that recall of one triggers recall of the other. Using a range of techniques including in vivo calcium imaging with miniature head-mounted fluorescent microscopes in freely behaving mice, Alcino Silva and colleagues show that learning-dependent changes in excitability can temporally and contextually link memories formed close in time. Interestingly the overlap between memory encoding ensembles and strengthening of the second memory within short periods of time do not occur in aged animals, which do not exhibit the increased hippocampal excitability necessary for such links to occur. Recent studies suggest that a shared neural ensemble may link distinct memories encoded close in time1,2,3,4,5,6,7,8,9,10,11,12. According to the memory allocation hypothesis1,2, learning triggers a temporary increase in neuronal excitability13,14,15 that biases the representation of a subsequent memory to the neuronal ensemble encoding the first memory, such that recall of one memory increases the likelihood of recalling the other memory. Here we show in mice that the overlap between the hippocampal CA1 ensembles activated by two distinct contexts acquired within a day is higher than when they are separated by a week. Several findings indicate that this overlap of neuronal ensembles links two contextual memories. First, fear paired with one context is transferred to a neutral context when the two contexts are acquired within a day but not across a week. Second, the first memory strengthens the second memory within a day but not across a week. Older mice, known to have lower CA1 excitability15,16, do not show the overlap between ensembles, the transfer of fear between contexts, or the strengthening of the second memory. Finally, in aged mice, increasing cellular excitability and activating a common ensemble of CA1 neurons during two distinct context exposures rescued the deficit in linking memories. Taken together, these findings demonstrate that contextual memories encoded close in time are linked by directing storage into overlapping ensembles. Alteration of these processes by ageing could affect the temporal structure of memories, thus impairing efficient recall of related information.