The bacterial LacI/GalR family repressors such as lactose operon repressor (LacI), purine nucleotide synthesis repressor (PurR), and trehalose operon repressor (TreR) consist of not only the N-terminal helix-turn-helix DNA-binding domain but also the C-terminal ligand-binding domain that is structurally homologous to periplasmic sugar-binding proteins. These structural features imply that the repressor family evolved by acquiring the DNA-binding domain in the N-terminal of an ancestral periplasmic binding protein (PBP). Phylogenetic analysis of the LacI/GalR family repressors and their PBP homologues revealed that the acquisition of the DNA-binding domain occurred first in the family, and ligand specificity then evolved. The phylogenetic tree also indicates that the acquisition occurred only once before the divergence of the major lineages of eubacteria, and that the LacI/GalR and the PBP families have since undergone extensive gene duplication/loss independently along the evolutionary lineages. Multiple alignments of the repressors and PBPs furthermore revealed that repressors and PBPs with the same ligand specificity have the same or similar residues in their binding sites. This result, together with the phylogenetic relationship, demonstrates that the repressors and the PBPs individually acquired the same ligand specificity by homoplasious replacement, even though their genes are encoded in the same operon.