Methodologies for the controlled delivery of genetic information into target cells are of utmost importance for genetic engineering in both fundamental and applied research. However, available methods for efficient gene transfer into user-selected or even single cells suffer from low throughput, the need for complicated equipment, high invasiveness, or side effects by off-target viral uptake. Here, we engineer an adeno-associated viral (AAV) vector system that transfers genetic information into native target cells upon illumination with cell-compatible red light. This OptoAAV system allows adjustable and spatially resolved gene transfer down to single-cell resolution and is compatible with different cell lines and primary cells. Moreover, the sequential application of multiple OptoAAVs enables spatially resolved transduction with different transgenes. The approach presented is likely extendable to other classes of viral vectors and is expected to foster advances in basic and applied genetic research. Copyright © 2021 The Authors, some rights reserved.