Nitrogen fixation is catalysed by some photosynthetic bacteria. This paper presents a phylogenetic comparison of a nitrogen fixation gene (nifH) with the aim of elucidating the processes underlying the evolutionary history of Rhodopseudomonas palustris. In the NifH phylogeny, strains of Rps. palustris were placed in close association with Rhodobacter spp. and other phototrophic purple non-sulfur bacteria belonging to the alpha-Proteobacteria, separated from its close relatives Bradyrhizobium japonicum and the phototrophic rhizobia (Bradyrhizobium spp. IRBG 2, IRBG 228, IRBG 230 and BTAi 1) as deduced from the 16S rRNA phylogeny. The close association of the strains of Rps. palustris with those of Rhodobacter and Rhodovulum, as well as Rhodospirillum rubrum, was supported by the mol% G+C of their nifH gene and by the signature sequences found in the sequence alignment. In contrast, comparison of a number of informational and operational genes common to Rps. palustris CGA009, B. japonicum USDA 110 and Rhodobacter sphaeroides 2.4.1 suggested that the genome of Rps. palustris is more related to that of B. japonicum than to the Rba. sphaeroides genome. These results strongly suggest that the nifH of Rps. palustris is highly related to those of the phototrophic purple non-sulfur bacteria included in this study, and might have come from an ancestral gene common to these phototrophic species through lateral gene transfer. Although this finding complicates the use of nifH to infer the phylogenetic relationships among the phototrophic bacteria in molecular diversity studies, it establishes a framework to resolve the origins and diversification of nitrogen fixation among the phototrophic bacteria in the alpha-Proteobacteria.