Although the oceanic cyanobacterium Prochlorococcus harvests light with a chlorophyll antenna [1-3] rather than with the phycobilisomes that are typical of cyanobacteria, some strains express genes that are remnants of the ancestral Synechococcus phycobilisomes . Similarly, some Prochlorococcus cyanophages, which often harbor photosynthesis-related genes , also carry homologs of phycobilisome pigment biosynthesis genes [6, 7]. Here, we investigate four such genes in two cyanophages that both infect abundant Prochlorococcus strains : homologs of heme oxygenase (ho1), 15,16-dihydrobiliverdin:ferredoxin oxidoreductase (pebA), ferredoxin (petF) in the myovirus P-SSM2, and a phycocyanobilin:ferredoxin oxidoreductase (pcyA) homolog in the myovirus P-SSM4. We demonstrate that the phage homologs mimic the respective host activities, with the exception of the divergent phage PebA homolog. In this case, the phage PebA single-handedly catalyzes a reaction for which uninfected host cells require two consecutive enzymes, PebA and PebB. We thus renamed the phage enzyme phycoerythrobilin synthase (PebS). This gene, and other pigment biosynthesis genes encoded by P-SSM2 (petF and ho1), are transcribed during infection, suggesting that they can improve phage fitness. Analyses of global ocean metagenomes show that PcyA and Ho1 occur in both cyanobacteria and their phages, whereas the novel PebS-encoding gene is exclusive to phages.