The RecA/Rad51/DCM1 family of ATP-dependent recombinases plays a crucial role in genetic recombination and double-stranded DNA break repair in Archaea, Bacteria, and Eukaryota. DnaB is the replication fork helicase in all Bacteria. We show here that DnaB shares significant sequence similarity with RecA and Rad51/DMC1 and two other related families of ATPases, Sms and KaiC. The conserved region spans the entire ATP- and DNA-binding domain that consists of about 250 amino acid residues and includes 7 distinct motifs. Comparison with the three-dimensional structure of Escherichia coli RecA and phage T7 DnaB (gp4) reveals that the area of sequence conservation includes the central parallel beta-sheet and most of the connecting helices and loops as well as a smaller domain that consists of a amino-terminal helix and a carboxy-terminal beta-meander. Additionally, we show that animals, plants, and the malarial Plasmodium but not Saccharomyces cerevisiae encode a previously undetected DnaB homolog that might function in the mitochondria. The DnaB homolog from Arabidopsis also contains a DnaG-primase domain and the DnaB homolog from the nematode seems to contain an inactivated version of the primase. This domain organization is reminiscent of bacteriophage primases-helicases and suggests that DnaB might have been horizontally introduced into the nuclear eukaryotic genome via a phage vector. We hypothesize that DnaB originated from a duplication of a RecA-like ancestor after the divergence of the bacteria from Archaea and eukaryotes, which indicates that the replication fork helicases in Bacteria and Archaea/Eukaryota have evolved independently.