Programmed DNA rearrangements that occur during cellular differentiation are uncommon and have been described in only two prokaryotic organisms. Here, we identify the developmentally regulated rearrangement of a hydrogenase gene in heterocysts of the cyanobacterium Anabaena sp. strain PCC 7120. Heterocysts are terminally differentiated cells specialized for nitrogen fixation. Late during heterocyst differentiation, a 10.5-kb DNA element is excised from within the hupL gene by site-specific recombination between 16-bp direct repeats that flank the element. The predicted HupL polypeptide is homologous to the large subunit of [NiFe] uptake hydrogenases. hupL is expressed similarly to the nitrogen-fixation genes; hupL message was detected only during the late stages of heterocyst development. An open reading frame, named xisC, identified near one end of the hupL DNA element is presumed to encode the element's site-specific recombinase. The predicted XisC polypeptide is homologous with the Anabaena sp. strain PCC 7120 site-specific recombinase XisA. Neither XisC nor XisA shows sequence similarity to other proteins, suggesting that they represent a different class of site-specific recombinase.