Phycobiliproteins, unlike other light-harvesting proteins involved in photosynthesis, bear covalently attached chromophores. The bilin chromophores are attached through thioether bonds to cysteine residues. The cyanobacterium Synechococcus sp. PCC 7002 has eight distinct bilin attachment sites on seven polypeptides, all of which carry the same chromophore, phycocyanobilin. When two genes in the phycocyanin operon of this organism, cpcE and cpcF, are inactivated by insertion, together or separately, the surprising result is elimination of correct bilin attachment at only one site, that on the alpha subunit of phycocyanin. We have overproduced CpcE and CpcF in Escherichia coli. In vitro, these proteins catalyze the attachment of phycocyanobilin to the alpha subunit of apophycocyanin at the appropriate site, alpha-Cys-84, to form the correct adduct. CpcE and CpcF also efficiently catalyze the reverse reaction, in which the bilin from holo-alpha subunit is transferred either to the apo-alpha subunit of the same C-phycocyanin or to the apo-alpha subunit of a heterologous C-phycocyanin. The forward and reverse reactions each require both CpcE and CpcF and are specific for the alpha-Cys-84 position. Phycocyanobilin is the immediate precursor of the protein-bound bilin.