The ability to modulate the fluorescence of optical probes can be used to enhance signal-to-noise ratios for imaging within highly autofluorescent environments, such as intact tissues and living organisms. Here, we report two bacteriophytochrome-based photoactivatable near-infrared fluorescent proteins, named PAiRFP1 and PAiRFP2. PAiRFPs utilize haem-derived biliverdin, ubiquitous in mammalian tissues, as the chromophore. Initially weakly fluorescent PAiRFPs undergo photoconversion into a highly fluorescent state with excitation/emission at 690/717 nm following a brief irradiation with far-red light. After photoactivation, PAiRFPs slowly revert back to initial state, enabling multiple photoactivation-relaxation cycles. Low-temperature optical spectroscopy reveals several intermediates involved in PAiRFP photocycles, which all differ from that of the bacteriophytochrome precursor. PAiRFPs can be photoactivated in a spatially selective manner in mouse tissues, and optical modulation of their fluorescence allows for substantial contrast enhancement, making PAiRFPs advantageous over permanently fluorescent probes for in vivo imaging conditions of high autofluorescence and low signal levels.