BACKGROUND: Identifying the molecular mechanisms and neural circuits that control learning and memory are major challenges in neuroscience. Mammalian MAGI/S-SCAM is a multi-PDZ domain synaptic scaffolding protein that interacts with a number of postsynaptic signaling proteins and is thereby thought to regulate synaptic plasticity , , . PRINCIPAL FINDINGS: While investigating the behavioral defects of C. elegans nematodes carrying a mutation in the single MAGI ortholog magi-1, we have identified specific neurons that require MAGI-1 function for different aspects of associative learning and memory. Various sensory stimuli and a food deprivation signal are associated in RIA interneurons during learning, while additional expression of MAGI-1 in glutamatergic AVA, AVD and possibly AVE interneurons is required for efficient memory consolidation, i.e. the ability to retain the conditioned changes in behavior over time. During associative learning, MAGI-1 in RIA neurons controls in a cell non-autonomous fashion the dynamic remodeling of AVA, AVD and AVE synapses containing the ionotropic glutamate receptor (iGluR) GLR-1 . During memory consolidation, however, MAGI-1 controls GLR-1 clustering in AVA and AVD interneurons cell-autonomously and depends on the ability to interact with the beta-catenin HMP-2. SIGNIFICANCE: Together, these results indicate that different aspects of associative learning and memory in C. elegans are likely carried out by distinct subsets of interneurons. The synaptic scaffolding protein MAGI-1 plays a critical role in these processes in part by regulating the clustering of iGluRs at synapses.