Purple sulfur bacteria, which are known to be the most ancient among anoxygenic phototrophs, play an important role in the global sulfur cycle. Allochromatium vinosum oxidizes reduced sulfur compounds such as hydrogen sulfide, elemental sulfur and thiosulfide. At low oxygen concentrations, A. vinosum can grow chemotrophically using oxygen as the terminal electron acceptor. Being also a nitrogen fixer, A. vinosum is faced with the paradox of co-existence of aerobic metabolism and nitrogen fixation. Due to growth difficulties, only a few studies have dealt with the aerobic metabolism of the organism and, until now, there has been no information about the genes involved in the respiratory metabolism of purple sulfur bacteria. In this article we show the first terminal oxidase gene for A. vinosum. The presence of a Bd type of quinol oxidase is necessary to protect nitrogenases against the inhibitory effects of oxygen. In this case, a nitrogen fixation related gene is part of the cyd operon and this gene is co-transcribed with cydAB genes. Bd oxidase of A. vinosum may be the earliest form of oxidase where the function of the enzyme is to scavenge the contaminant oxygen during nitrogen fixation. This may be an important clue about the early evolution of oxygenic photosynthesis, perhaps as a protective mechanism for nitrogen fixation.