The distinction between non-associative and associative forms of learning has historically been based on the behavioral training paradigm. Through discovering the molecular mechanisms that mediate learning, we can develop a deeper understanding of the relationships between different forms of learning. Here, we genetically dissect short- and long-term memory for a non-associative form of learning, habituation and an associative form of learning, context conditioning for habituation, in the nematode Caenorhabditis elegans. In short-term chemosensory context conditioning for habituation, worms trained and tested in the presence of either a taste (sodium acetate) or smell (diacetyl) context cue show greater retention of habituation to tap stimuli when compared with animals trained and tested without a salient cue. Long-term memory for olfactory context conditioning was observed 24 h after a training procedure that does not normally induce 24 h memory. Like long-term habituation, this long-term memory was dependent on the transcription factor cyclic AMP-response element-binding protein. Worms with mutations in
glr-1 [a non-N-methyl-d-aspartate (NMDA)-type glutamate receptor subunit] showed short-term but not long-term habituation or short- or long-term context conditioning. Worms with mutations in
nmr-1 (an NMDA-receptor subunit) showed normal short- and long-term memory for habituation but did not show either short- or long-term context conditioning. Rescue of
nmr-1 in the RIM interneurons rescued short- and long-term olfactory context conditioning leading to the hypothesis that these interneurons function to integrate information from chemosensory and mechanosensory systems for associative learning.