Techniques allowing precise spatial and temporal control of gene expression in the brain are needed. Herein we describe optogenetic approaches using a photo-activatable Cre recombinase (PA-Cre) to stably modify gene expression in the mouse brain. Blue light illumination for 12hours via optical fibers activated PA-Cre in the hippocampus, a deep brain structure. Two-photon illumination through a thinned skull window for 100minutes activated PA-Cre within a sub-millimeter region of cortex. Light activation of PA-Cre may allow permanent gene modification with improved spatiotemporal precision compared to standard methods.