The ATP-binding cassette transporter system ThiXYZ transports N-formyl-4-amino-5-(aminomethyl)-2-methylpyrimidine (FAMP), a thiamin salvage pathway intermediate, into cells. FAMP is then converted to 4-amino-5-(hydroxymethyl)-2-methylpyrimidine (HMP) and recycled into the thiamin biosynthetic pathway. ThiY is the periplasmic substrate binding protein of the ThiXYZ system and delivers the substrate FAMP to the transmembrane domain. We report the crystal structure of Bacillus halodurans ThiY with FAMP bound at 2.4 Å resolution determined by single-wavelength anomalous diffraction phasing. The crystal structure reveals that ThiY belongs to the group II periplasmic binding protein family. The closest structural homologues of ThiY are periplasmic binding proteins involved in alkanesulfonate/nitrate and bicarbonate transport. ThiY is also structurally homologous to thiamin binding protein (TbpA) and to thiaminase-I. THI5 is responsible for the synthesis of 4-amino-5-(hydroxymethyl)-2-methylpyrimidine phosphate in the thiamin biosynthetic pathway of eukaryotes and is approximately 25% identical in sequence with ThiY. A homology model of Saccharomyces cerevisiae THI5 was generated on the basis of the structure of ThiY. Many features of the thiamin pyrimidine binding site are shared between ThiY and THI5, suggesting a common ancestor.