Bacteriophytochromes sense light in the near-infrared window, the spectral region where absorption by mammalian tissues is minimal, and their chromophore, biliverdin IXα, is naturally present in animal cells. These properties make bacteriophytochromes particularly attractive for optogenetic applications. However, the lack of understanding of how light-induced conformational changes control output activities has hindered engineering of bacteriophytochromebased optogenetic tools. Many bacteriophytochromes function as homodimeric enzymes, in which light-induced conformational changes are transferred via α-helical linkers to the rigid output domains. We hypothesized that heterologous output domains requiring homodimerization can be fused to the photosensory modules of bacteriophytochromes to generate light-activated fusions. Here, we tested this hypothesis by engineering adenylate cyclases regulated by light in the near-infrared spectral window using the photosensory module of the Rhodobacter sphaeroides bacteriophytochrome BphG1 and the adenylate cyclase domain from Nostoc sp. CyaB1. We engineered several light-activated fusion proteins that differed from each other by approximately one or two α-helical turns, suggesting that positioning of the output domains in the same phase of the helix is important for light-dependent activity. Extensive mutagenesis of one of these fusions resulted in an adenylate cyclase with a sixfold photodynamic range. Additional mutagenesis produced an enzyme with a more stable photoactivated state. When expressed in cholinergic neurons in Caenorhabditis elegans, the engineered adenylate cyclase affected worm behavior in a light-dependent manner. The insights derived from this study can be applied to the engineering of other homodimeric bacteriophytochromes, which will further expand the optogenetic toolset.phytochrome | protein engineering | adenylyl cyclase | cAMP | locomotion