Abstract
Temporally and spatially selective closed-loop perturbation of brain activity can be used to reveal the contribution of spontaneous neural events to behavior. Here, we present a protocol for optogenetic inhibition of the medial prefrontal cortex following hippocampal sharp-wave ripple events in freely behaving rats. We describe procedures for injecting a viral vector bilaterally, constructing and implanting an assembly of optical fibers and tetrodes, and performing closed-loop perturbations in rats. For complete details on the use and execution of this protocol, please refer to den Bakker et al.(1).