A Experiment diagram: Top-Left: animals were bilaterally infected with AAV-oChIEF-tdTomato in the LHb and implanted with optic fibers above the LHb 4 weeks before training. Top-Right: during whole-training session the LHb was stimulated with 5 ms light pulses at 20 Hz to disrupt endogenous neuronal activity. Bottom: diagram of training and tests. Cued memory was tested 7 days after training in Context B. The same animals were re-tested the following day in the training context to evaluate contextual FC memory and tone freezing in a context + tone session. B Microphotographs of the AAV-oChIEF-tdTomato infection at approximately 3.3 mm posterior to bregma (top, middle, bottom: DAPI, tdTomato fluorescence, and merge respectively). Dashed white lines in the middle panel delimitates brain structures. * indicates the optic fiber tract. MHb: medial habenula, sm: stria medullaris, 3V: third ventricle. Scale bars: 1 mm. Freezing over time during cued test at day 7 (C) and during context + tone test at day 8 (D). Dashed line delimited area indicates tone presentation. E Average freezing of tone test and context + tone test sessions. Disruption of endogenous LHb activity during training by optogenetic stimulation-induced deficits in cued (tone freezing during Tone Test: control vs oChIEF + light: t(42) = 4.454, p = 0.0004; tone freezing during Context + Tone test: control vs oChIEF + light: t(42) = 2.995, p = 0.0317 respectively), and contextual memories (pre-tone freezing during context + tone test: control vs oChIEF + light: t(42) = 3.874, p = 0.0026). nControl = 7, noChIEF + light = 6. Additional statistics can be found in the Statistics details section of Supplementary Material.