Upon illumination, photosensitizer molecules produce reactive oxygen species that can be used for functional manipulation of living cells, including protein inactivation, targeted-damage introduction and cellular ablation. Photosensitizers used to date have been either exogenous, resulting in delivery and removal challenges, or genetically encoded proteins that form or bind a native photosensitizing molecule, resulting in a constitutively active photosensitizer inside the cell. We describe a genetically encoded fluorogen-activating protein (FAP) that binds a heavy atom-substituted fluorogenic dye, forming an 'on-demand' activated photosensitizer that produces singlet oxygen and fluorescence when activated with near-infrared light. This targeted and activated photosensitizer (TAPs) approach enables protein inactivation, targeted cell killing and rapid targeted lineage ablation in living larval and adult zebrafish. The near-infrared excitation and emission of this FAP-TAPs provides a new spectral range for photosensitizer proteins that could be useful for imaging, manipulation and cellular ablation deep within living organisms.